.
```twig
-{% set content %}
- {entry:blog/hello-world:link} was my first blog post. Pretty geeky, huh?
-{% endset %}
-
-{{ content|parseRefs|raw }}
+{{ 'SELECT id, * FROM table'|literal }}
+{# Output: SELECT id\, \* FROM table #}
```
-## `json_encode`
-
-[リファレンスタグ](../reference-tags.md)の文字列を解析します。
-
-「PascalCase」(別名「UpperCamelCase」)でフォーマットされた文字列を返します。
-
-## `json_decode`
-
-ユーザーが優先する言語に応じて、割合をフォーマットします。
-
-## `kebab`
-
-文字列の一部を他のものに置き換えます。
+## `markdown` or `md`
-ペアの検索 / 置換のオブジェクトを渡すことで、一度に複数のものを置き換えることができます。
+Processes a string with [Markdown](https://daringfireball.net/projects/markdown/).
```twig
-{{ "foo bar"|pascal }}
-{# Outputs: FooBar #}
-```
+{% set content %}
+# Everything You Need to Know About Computer Keyboards
-または、一度に1つのものを置き換えることができます。
+The only *real* computer keyboard ever made was famously
+the [Apple Extended Keyboard II] [1].
-```twig
-{% set str = "Hello, FIRST LAST" %}
+ [1]: https://www.flickr.com/photos/gruber/sets/72157604797968156/
+{% endset %}
-{{ str|replace({
- FIRST: currentUser.firstName,
- LAST: currentUser.lastName
-}) }}
+{{ content|markdown }}
```
-## `lcfirst`
-
-置換文字列の値の最初と最後にスラッシュを付けてマッチするものを検索することで、正規表現も利用できます。
-
-## `literal`
-
-最も近い整数値に数を丸めます。
-
-RSS フィードに必要な形式(`D, d M Y H:i:s O`)で日付を出力します。
-
-## `format`
-
-「snake_case」でフォーマットされた文字列を返します。
-
-タイムスタンプ、または、[DateTime](http://php.net/manual/en/class.datetime.php) オブジェクトのフォーマットされた時刻を出力します。
+This filter supports two arguments:
+- `flavor` は、`'original'`(デフォルト値)、`'gfm'`(GitHub-Flavored Markdown)、`'gfm-comment'`(改行が` `に変換された GFM)、 または、`'extra'`(Markdown Extra)にできます。
+- `inlineOnly` は、`` タグを除き、インライン要素だけを解析するかどうかを決定します。(デフォルトは `false`)
## `multisort`
-`format` パラメータに値を渡すことで、詳細がどの程度提供されるかをカスタマイズできます。
-
-```twig
-{% set str = "Hello, NAME" %}
-
-{{ str|replace('NAME', currentUser.name) }}
-```
-
-## `number`
+Sorts an array by one or more properties or keys within an array’s values.
-利用可能な `format` 値は、次の通りです。
+To sort by a single property or key, pass its name as a string:
```twig
-{{ tag.title|lower|replace('/[^\\w]+/', '-') }}
-```
-
-使用される正確な時刻のフォーマットは、現在のアプリケーションのローケルに依存します。異なるローケルの時刻のフォーマットを使用したい場合、`locale` パラメータを利用します。
-
-```php
-{{ 42.1|round }} → 42
-{{ 42.9|round }} → 43
+{% set entries = entries|multisort('title') %}
```
-## `parseRefs`
-
-`timezone` パラメータを使用して、出力される時刻のタイムゾーンをカスタマイズできます。
+To sort by multiple properties or keys, pass them in as an array. For example, this will sort entries by their post date first, and then by their title:
```twig
-{{ entry.postDate|rss }}
+{% set entries = entries|multisort(['postDate', 'title']) %}
```
-## `pascal`
-
-経由で、人が読めるタイムスタンプとして日付をフォーマットします。
+An arrow function can be passed instead, if the values that should be sorted by don’t exist as a property or key on the array elements.
```twig
-{{ "foo bar"|snake }}
-{# Outputs: foo_bar #}
+{% set entries = entries|multisort(e => e.author.fullName) %}
```
-## `percentage`
-
-[Craft::t()](api:yii\BaseYii::t()) でメッセージを翻訳します。
+The values will be sorted in ascending order by default. You can switch to descending order with the `direction` param:
```twig
-{{ entry.postDate|time }} → 10:00:00 AM
+{% set entries = entries|multisort('title', direction=SORT_DESC) %}
```
-## `replace`
-
-カテゴリの指定がない場合、デフォルトで `site` になります。
+You can also customize which sorting behavior is used, with the `sortFlag` param. For example, to sort items numerically, use `SORT_NUMERIC`:
```twig
-{{ entry.postDate|time('short') }} → 10:00 AM
+{% set entries = entries|multisort('id', sortFlag=SORT_NUMERIC) %}
```
-## `round`
-
-::: tip
-これがどのように機能するかの詳細については、[静的メッセージの翻訳](../static-translations.md)を参照してください。
-:::
-
-文字列の最初の文字を大文字にします。
-
-## `rss`
-
-文字列に含まれるそれぞれの単語の最初の文字を大文字にします。
-
-配列に [array_unique()](http://php.net/manual/en/function.array-unique.php) を実行します。
+See PHP’s [sort()](https://www.php.net/manual/en/function.sort.php) documentation for the available sort flags.
-## `snake`
-
-指定された配列のすべての値の配列を返しますが、カスタムキーは除かれます。
+When sorting by multiple properties or keys, you must set the `direction` and `sortFlag` params to arrays as well.
```twig
-{{ entry.postDate|time('short', locale='en-GB') }} → 17:00
+{% set entries = entries|multisort([
+ 'postDate',
+ 'title',
+], sortFlag=[SORT_NATURAL, SORT_FLAG_CASE]) %}
```
-## `time`
+## `namespace`
-指定されたエレメントを除いた配列を返します。
+The `|namespace` filter can be used to namespace input names and other HTML attributes.
-Tip: That’s a reference to [shish kebabs](https://en.wikipedia.org/wiki/Kebab#Shish) for those of you that don’t get the analogy.
+For example, this:
```twig
-{{ entry.postDate|time('short', timezone='UTC') }} → 12:00 AM
+{% set html %}
+
+{% endset %}
+{{ html|namespace('foo') }}
```
-## `timestamp`
-
-Returns the keys of an array.
-
-This works identically to Twig’s core [`keys`](https://twig.symfony.com/doc/2.x/filters/keys.html) filter.
-
-## `last`
-
-Returns the last element of an array or string.
-
-This works identically to Twig’s core [`last`](https://twig.symfony.com/doc/2.x/filters/last.html) filter.
-
-## `ucfirst`
-
-Lowercases the first character of a string.
-
-## `ucwords`
+would become this:
-Returns the number of elements in an array or string.
+```html
+
+```
-This works identically to Twig’s core [`length`](https://twig.symfony.com/doc/2.x/filters/length.html) filter.
+Notice how the `id` attribute changed from `title` to `foo-title`, and the `name` attribute changed from `title` to `foo[title]`.
-## `unique`
+## `namespaceInputId`
-Runs a string through
+Namepaces an element ID.
-## `values`
+For example, this:
-Converts a value to lowercase.
+```twig
+{{ 'bar'|namespaceInputId('foo') }}
+```
-This works identically to Twig’s core [`lower`](https://twig.symfony.com/doc/2.x/filters/lower.html) filter.
+would output:
-## `without`
+```html
+foo-bar
+```
-Applies an arrow function to the elements of an array.
+::: tip
+If this is used within a [namespace](tags.md#namespace) tag, the namespace applied by the tag will be used by default.
+:::
-This works identically to Twig’s core [`map`](https://twig.symfony.com/doc/2.x/filters/map.html) filter.
+## `namespaceInputName`
-## `markdown` or `md`
+Namepaces an input name.
-Processes a string with [Markdown](https://daringfireball.net/projects/markdown/).
+For example, this:
```twig
-{{ "Hello world"|t('myCategory') }}
+{{ 'bar'|namespaceInputName('foo') }}
```
-This filter supports two arguments:
-- `flavor` は、`'original'`(デフォルト値)、`'gfm'`(GitHub-Flavored Markdown)、`'gfm-comment'`(改行が` `に変換された GFM)、 または、`'extra'`(Markdown Extra)にできます。
-- `inlineOnly` は、`` タグを除き、インライン要素だけを解析するかどうかを決定します。(デフォルトは `false`)
-
-## `merge`
-
-Merges an array with another array.
-
-This works identically to Twig’s core [`merge`](https://twig.symfony.com/doc/2.x/filters/merge.html) filter.
-
-## `multisort`
-
-Sorts an array with [ArrayHelper::multisort()](api:yii\helpers\BaseArrayHelper::multisort()).
+would output:
-## `nl2br`
-
-Inserts HTML line breaks before all newlines in a string.
+```html
+foo[bar]
+```
-This works identically to Twig’s core [`nl2br`](https://twig.symfony.com/doc/2.x/filters/nl2br.html) filter.
+::: tip
+If this is used within a [namespace](tags.md#namespace) tag, the namespace applied by the tag will be used by default.
+:::
## `number`
@@ -511,23 +651,23 @@ Formats a number according to the user’s preferred language.
You can optionally pass `false` to it if you want group symbols to be omitted (e.g. commas in English).
```twig
-{{ "Hello world"|t }}
-```
+{{ 1000000|number }}
+{# Output: 1,000,000 #}
-## `number_format`
-
-Formats numbers. It is a wrapper around PHP’s [number_format()](https://secure.php.net/number_format) function:
-
-This works identically to Twig’s core [`number_format`](https://twig.symfony.com/doc/2.x/filters/number_format.html) filter.
+{{ 1000000|number(false) }}
+{# Output: 1000000 #}
+```
## `parseRefs`
Parses a string for [reference tags](../reference-tags.md).
```twig
-{% set arr1 = {foo: "Foo", bar: "Bar"} %}
-{% set arr2 = arr1|values %}
-{# arr2 = ["Foo", "Bar"] #}
+{% set content %}
+ {entry:blog/hello-world:link} was my first blog post. Pretty geeky, huh?
+{% endset %}
+
+{{ content|parseRefs|raw }}
```
## `pascal`
@@ -535,9 +675,8 @@ Parses a string for [reference tags](../reference-tags.md).
Returns a string formatted in “PascalCase” (AKA “UpperCamelCase”).
```twig
-{% set entries = craft.entries.section('articles').limit(3).find %}
-{% set firstEntry = entries[0] %}
-{% set remainingEntries = entries|without(firstEntry) %}
+{{ 'foo bar'|pascal }}
+{# Output: FooBar #}
```
## `percentage`
@@ -567,17 +706,21 @@ If you want to replace an existing element of the same type, pass `'replace'` as
{# Output:
#}
```
-## `raw`
+## `purify`
-Marks a value as being “safe”, which means that in an environment with automatic escaping enabled this variable will not be escaped if raw is the last filter applied to it.
+Runs the given text through HTML Purifier.
-This works identically to Twig’s core [`raw`](https://twig.symfony.com/doc/2.x/filters/raw.html) filter.
+```twig
+{{ user.bio|purify }}
+```
-## `reduce`
+You can specify a custom HTML Purifier config file as well:
-Iteratively reduces a sequence or a mapping to a single value using an arrow function, so as to reduce it to a single value. The arrow function receives the return value of the previous iteration and the current value of the sequence or mapping.
+```twig
+{{ user.bio|purify('user_bio') }}
+```
-This works identically to Twig’s core [`reduce`](https://twig.symfony.com/doc/2.x/filters/reduce.html) filter.
+That will configure HTML Purifier based on the settings defined by `config/htmlpurifier/user_bio.json`.
## `replace`
@@ -608,18 +751,6 @@ You can also use a regular expression to search for matches by starting and endi
{{ tag.title|lower|replace('/[^\\w]+/', '-') }}
```
-## `reverse`
-
-Reverses an array or string.
-
-This works identically to Twig’s core [`reverse`](https://twig.symfony.com/doc/2.x/filters/reverse.html) filter.
-
-## `round`
-
-Rounds a number to a given precision.
-
-This works identically to Twig’s core [`round`](https://twig.symfony.com/doc/2.x/filters/round.html) filter.
-
## `rss`
Outputs a date in the format required for RSS feeds (`D, d M Y H:i:s O`).
@@ -628,12 +759,6 @@ Outputs a date in the format required for RSS feeds (`D, d M Y H:i:s O`).
{{ entry.postDate|rss }}
```
-## `slice`
-
-Extracts a slice of an array or string.
-
-This works identically to Twig’s core [`slice`](https://twig.symfony.com/doc/2.x/filters/slice.html) filter.
-
## `snake`
Returns a string formatted in “snake_case”.
@@ -643,30 +768,6 @@ Returns a string formatted in “snake_case”.
{# Output: foo_bar #}
```
-## `sort`
-
-Sorts an array.
-
-This works identically to Twig’s core [`sort`](https://twig.symfony.com/doc/2.x/filters/sort.html) filter.
-
-## `spaceless`
-
-Removes whitespace between HTML tags, not whitespace within HTML tags or whitespace in plain text.
-
-This works identically to Twig’s core [`spaceless`](https://twig.symfony.com/doc/2.x/filters/spaceless.html) filter.
-
-## `split`
-
-Splits a string by the given delimiter and returns a list of string.
-
-This works identically to Twig’s core [`split`](https://twig.symfony.com/doc/2.x/filters/split.html) filter.
-
-## `striptags`
-
-Strips SGML/XML tags and replace adjacent whitespace by one space.
-
-This works identically to Twig’s core [`striptags`](https://twig.symfony.com/doc/2.x/filters/striptags.html) filter.
-
## `time`
Outputs the time of day for a timestamp or [DateTime](http://php.net/manual/en/class.datetime.php) object.
@@ -685,11 +786,11 @@ Craft provides some special format keywords that will output locale-specific tim
Possible `format` values are:
-| フォーマット | 実例 |
-| ------------------ | -------------- |
-| `short` | 5:00 PM |
-| `medium` _(デフォルト)_ | 5:00:00 PM |
-| `long` | 5:00:00 PM PDT |
+| Format | Example |
+| -------------------- | -------------- |
+| `short` | 5:00 PM |
+| `medium` _(default)_ | 5:00:00 PM |
+| `long` | 5:00:00 PM PDT |
The current application locale will be used by default. If you want to format the date and time for a different locale, use the `locale` argument:
@@ -709,17 +810,10 @@ You can customize the timezone the time is output in, using the `timezone` param
Formats a date as a human-readable timestamp, via .
-## `title`
-
-Returns a titlecased version of the value. Words will start with uppercase letters, all remaining characters are lowercase.
-
-This works identically to Twig’s core [`title`](https://twig.symfony.com/doc/2.x/filters/title.html) filter.
-
-## `trim`
-
-Strips whitespace (or other characters) from the beginning and end of a string
-
-This works identically to Twig’s core [`trim`](https://twig.symfony.com/doc/2.x/filters/trim.html) filter.
+```twig
+{{ now|timestamp }}
+{# Output: 9:00:00 AM #}
+```
## `translate` or `t`
@@ -743,25 +837,20 @@ See [Static Message Translations](../static-translations.md) for a full explanat
Capitalizes the first character of a string.
-## `ucwords`
-
-Capitalizes the first character of each word in a string.
+```twig
+{{ 'foobar'|ucfirst }}
+{# Output: Foobar #}
+```
## `unique`
Runs an array through [array_unique()](http://php.net/manual/en/function.array-unique.php).
-## `upper`
-
-Converts a value to uppercase.
-
-This works identically to Twig’s core [`upper`](https://twig.symfony.com/doc/2.x/filters/upper.html) filter.
-
-## `url_encode`
-
-Percent-encodes a given string as URL segment or an array as query string.
-
-This works identically to Twig’s core [`url_encode`](https://twig.symfony.com/doc/2.x/filters/url_encode.html) filter.
+```twig
+{% set array = ['Larry', 'Darryl', 'Darryl'] %}
+{{ array|unique }}
+{# Result: ['Larry', 'Darryl'] #}
+```
## `values`
diff --git a/ja/dev/functions.md b/ja/dev/functions.md
index e34d6f645cb..5acd66c3cad 100644
--- a/ja/dev/functions.md
+++ b/ja/dev/functions.md
@@ -1,6 +1,52 @@
# ファンクション
-[Twig に付随する](https://twig.symfony.com/doc/functions/index.html)テンプレートファンクションに加えて、Craft がいくつか独自のものを提供します。
+The following [functions](https://twig.symfony.com/doc/2.x/templates.html#functions) are available to Twig templates in Craft:
+
+| Function | Description |
+| ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
+| [actionInput](#actioninput) | Outputs a hidden `action` input. |
+| [actionUrl](#actionurl) | Generates a controller action URL. |
+| [alias](#alias) | Parses a string as an alias. |
+| [attr](#attr) | Generates HTML attributes. |
+| [attribute](https://twig.symfony.com/doc/2.x/functions/attribute.html) | Accesses a dynamic attribute of a variable. |
+| [beginBody](#beginbody) | Outputs scripts and styles that were registered for the “begin body” position. |
+| [block](https://twig.symfony.com/doc/2.x/functions/block.html) | Prints a block’s output. |
+| [ceil](#ceil) | Rounds a number up. |
+| [className](#classname) | Returns the fully qualified class name of a given object. |
+| [clone](#clone) | Clones an object. |
+| [combine](#combine) | Combines two arrays into one. |
+| [constant](https://twig.symfony.com/doc/2.x/functions/constant.html) | Returns the constant value for a given string. |
+| [create](#create) | Creates a new object. |
+| [csrfInput](#csrfinput) | Returns a hidden CSRF token input. |
+| [cpUrl](#cpurl) | Generates a control panel URL. |
+| [cycle](https://twig.symfony.com/doc/2.x/functions/cycle.html) | Cycles on an array of values. |
+| [date](https://twig.symfony.com/doc/2.x/functions/date.html) | Creates a date. |
+| [dump](https://twig.symfony.com/doc/2.x/functions/dump.html) | Dumps information about a variable. |
+| [endBody](#endbody) | Outputs scripts and styles that were registered for the “end body” position. |
+| [expression](#expression) | Creates a database expression object. |
+| [floor](#floor) | Rounds a number down. |
+| [getenv](#getenv) | Returns the value of an environment variable. |
+| [gql](#gql) | Executes a GraphQL query against the full schema. |
+| [parseEnv](#parseenv) | Parses a string as an environment variable or alias. |
+| [head](#head) | Outputs scripts and styles that were registered for the “head” position. |
+| [hiddenInput](#hiddeninput) | Outputs a hidden input. |
+| [include](https://twig.symfony.com/doc/2.x/functions/include.html) | Returns the rendered content of a template. |
+| [input](#input) | Outputs an HTML input. |
+| [max](https://twig.symfony.com/doc/2.x/functions/max.html) | Returns the biggest value in an array. |
+| [min](https://twig.symfony.com/doc/2.x/functions/min.html) | Returns the lowest value in an array. |
+| [parent](https://twig.symfony.com/doc/2.x/functions/parent.html) | Returns the parent block’s output. |
+| [plugin](#plugin) | Returns a plugin instance by its handle. |
+| [random](https://twig.symfony.com/doc/2.x/functions/random.html) | Returns a random value. |
+| [range](https://twig.symfony.com/doc/2.x/functions/range.html) | Returns a list containing an arithmetic progression of integers. |
+| [redirectInput](#redirectinput) | Outputs a hidden `redirect` input. |
+| [seq](#seq) | Outputs the next or current number in a sequence. |
+| [shuffle](#shuffle) | Randomizes the order of the items in an array. |
+| [siteUrl](#siteurl) | Generates a front-end URL. |
+| [svg](#svg) | Outputs an SVG document. |
+| [source](https://twig.symfony.com/doc/2.x/functions/source.html) | Returns the content of a template without rendering it. |
+| [tag](#tag) | Outputs an HTML tag. |
+| [template_from_string](https://twig.symfony.com/doc/2.x/functions/template_from_string.html) | Loads a template from a string. |
+| [url](#url) | Generates a URL. |
## `actionInput( actionPath )`
@@ -17,9 +63,21 @@
```
-## `alias( string )`
+## `actionUrl`
-「begin body」に登録されたスクリプトやスタイルを出力します。`` タグの直後に配置する必要があります。
+Returns a controller action URL, automatically accounting for relative vs. absolute format and the active setting.
+
+### 引数
+
+The `actionUrl()` function has the following arguments:
+
+* **`path`** – 結果となる URL がサイトで指すべきパス。それは、ベースサイト URL に追加されます。
+* **`params`** – Any query string parameters that should be appended to the URL. This can be either a string (e.g. `'foo=1&bar=2'`) or a [hash](twig-primer.md#hashes) (e.g. `{foo:'1', bar:'2'}`).
+* **`scheme`** – URL が使用するスキーム(`'http'` または `'https'`)。デフォルト値は、現在のリクエストが SSL 経由で配信されているかどうかに依存します。そうでなければ、サイト URL のスキームが使用され、SSL 経由なら `https` が使用されます。
+
+## `alias`
+
+Passes a string through [Craft::getAlias()](api:yii\BaseYii::getAlias()), which will check if the string begins with an [alias](https://www.yiiframework.com/doc/guide/2.0/en/concept-aliases). (See [Configuration](../config/README.md#aliases) for more info.)
```twig
@@ -30,38 +88,32 @@
```
-## `beginBody()`
+## `attr`
-整数値に切り上げます。
+Generates a list of HTML attributes based on the given [hash](twig-primer.md#hashes), using .
```twig
{{ ceil(42.1) }} → 43
```
-## `ceil( num )`
-
-指定されたオブジェクトの完全修飾クラス名を返します。
-
-指定されたオブジェクトのクローンを作成します。
+## `beginBody`
-## `className( object )`
-
-与えられたクラス名やオブジェクト設定に基づいて新しいオブジェクトインスタンスを作成します。サポートされる引数の詳細については、 を参照してください。
+Outputs any scripts and styles that were registered for the “begin body” position. It should be placed right after your `` tag.
```twig
{% set query = craft.entries.section('news') %}
{% set articles = clone(query).type('articles') %}
```
-## `clone( object )`
+## `block`
-不可視の CSRF トークン入力欄を返します。CSRF 保護が有効になっているすべてのサイトでは、POST 経由で送信するそれぞれのフォームにこれを含めなければなりません。
+Prints a block’s output.
-「end body」に登録されたスクリプトやスタイルを出力します。`` タグの直前に配置する必要があります。
+This works identically to Twig’s core [`block`](https://twig.symfony.com/doc/2.x/functions/block.html) function.
-## `create( type )`
+## `ceil`
-データベースクエリで使用するための新しい オブジェクトを作成して返します。
+Rounds a number up.
```twig
{# Pass in a class name #}
@@ -75,18 +127,18 @@
}) %}
```
-## `csrfInput()`
+## `className`
-整数値に切り捨てます。
+Returns the fully qualified class name of a given object.
```twig
```
-## `endBody()`
+## `clone`
-環境変数の値を返します。
+Clones a given object.
```twig
@@ -97,122 +149,173 @@
```
-## `expression( expression, params, config )`
+## `combine`
-文字列が環境変数(`$VARIABLE_NAME`)、および / または、エイリアス(`@aliasName`)を参照しているかどうかを確認し、参照されている値を返します。
+Combines two arrays into one, using the first array to define the keys, and the second array to define the values.
-「head」に登録されたスクリプトやスタイルを出力します。`` タグの直前に配置する必要があります。
+```twig
+{% set arr1 = ['a', 'b', 'c'] %}
+{% set arr2 = ['foo', 'bar', 'baz'] %}
+{% set arr3 = combine(arr1, arr2) %}
+{# arr3 will now be `{a: 'foo', b: 'bar', c: 'baz'}` #}
+```
-## `floor( num )`
+## `constant`
-ハンドルに従ってプラグインインスタンスを返します。そのハンドルでインストールされ有効化されているプラグインがない場合、`null` を返します。
+Returns the constant value for a given string.
-```twig
-{{ floor(42.9) }} → 42
-```
+This works identically to Twig’s core [`constant`](https://twig.symfony.com/doc/2.x/functions/constant.html) function.
-## `getenv( name )`
+## `create`
-` ` を入力するためのショートカットです。
+Creates a new object instance based on a given class name or object configuration. See for a full explanation of supported arguments.
```twig
-{{ getenv('MAPS_API_KEY') }}
+{# Pass in a class name #}
+{% set cookie = create('yii\\web\\Cookie') %}
+
+{# Or a full object configuration hash #}
+{% set cookie = create({
+ class: 'yii\\web\\cookie',
+ name: 'foo',
+ value: 'bar'
+}) %}
```
-`name` で定義されたシーケンスの次または現在の番号を出力します。
+## `cpUrl`
+
+Returns a control panel URL, automatically accounting for relative vs. absolute format and the active setting.
```twig
-
- {{ siteName }}
- {{ head() }}
-
+Visit control panel settings
```
-## `parseEnv( str )`
-
-ファンクションが呼び出されるたびに、与えられたシーケンスは自動的にインクリメントされます。
+### 引数
-オプションで特定の長さにゼロ詰めした数値にすることができます。
+The `cpUrl()` function has the following arguments:
-## `head()`
+* **`path`** – The path that the resulting URL should point to on your site. It will be appended to your base site URL.
+* **`params`** – Any query string parameters that should be appended to the URL. This can be either a string (e.g. `'foo=1&bar=2'`) or a [hash](twig-primer.md#hashes) (e.g. `{foo:'1', bar:'2'}`).
+* **`scheme`** – Which scheme the URL should use (`'http'` or `'https'`). The default value depends on whether the current request is served over SSL or not. If not, then the scheme in your Site URL will be used; if so, then `https` will be used.
-インクリメントせずにシーケンスの現在の数字を表示するには、`next` 引数に `false` をセットします。
+## `csrfInput`
-配列内のエレメントの順序をランダム化します。
+Returns a hidden CSRF Token input. All sites that have CSRF Protection enabled must include this in each form that submits via POST.
-## `plugin( handle )`
+```twig
+{{ csrfInput() }}
+```
-サイト上のページへの URL を作成するため _だけ_ という点を除けば、[url()](#url-path-params-scheme-mustshowscriptname) と似ています。
+You can optionally set additional attributes on the tag by passing an `options` argument.
-`siteUrl()` ファンクションは、次の引数を持っています。
+```twig
+{{ csrfInput({
+ id: 'csrf-input'
+}) }}
+```
-## `redirectInput( url )`
+## `endBody`
-SVG 文書を出力します。
+Outputs any scripts and styles that were registered for the “end body” position. It should be placed right before your `