diff --git a/Documentation/typo3fluid/fluid/latest/Constant.rst b/Documentation/typo3fluid/fluid/latest/Constant.rst new file mode 100644 index 0000000..7b7ca2a --- /dev/null +++ b/Documentation/typo3fluid/fluid/latest/Constant.rst @@ -0,0 +1,76 @@ +.. This reStructured text file has been automatically generated, do not change. +.. Source: https://github.com/TYPO3/Fluid/blob/main/src/ViewHelpers/ConstantViewHelper.php + +:edit-on-github-link: https://github.com/TYPO3/Fluid/edit/main/src/ViewHelpers/ConstantViewHelper.php +:navigation-title: constant + +.. include:: /Includes.rst.txt + +.. _typo3fluid-fluid-constant: + +================================== +Constant ViewHelper `` +================================== + + + +Wrapper for PHPs :php:`constant` function. +See https://www.php.net/manual/function.constant.php. + +Examples +======== + +Get built-in PHP constant +------------------------- + +:: + + {f:constant(value: 'PHP_INT_MAX')} + +Output:: + + 9223372036854775807 + (Depending on CPU architecture). + +Get class constant +------------------ + +:: + + {f:constant(value: '\Vendor\Package\Class::CONSTANT')} + +Get enum value +-------------- + +:: + + {f:constant(value: '\Vendor\Package\Enum::CASE')} + +.. _typo3fluid-fluid-constant_source: + +Source code +=========== + +Go to the source code of this ViewHelper: `ConstantViewHelper.php (GitHub) `__. + +.. _typo3fluid-fluid-constant_arguments: + +Arguments +========= + +The following arguments are available for ``: + +.. confval-menu:: + :display: table + :type: + :default: + + +.. _typo3fluid-fluid-constant-name_argument: + +.. confval:: name + :name: typo3fluid-fluid-constant-name + :type: string + :required: false + + String representation of a PHP constant or enum diff --git a/Documentation/typo3fluid/fluid/latest/Index.rst b/Documentation/typo3fluid/fluid/latest/Index.rst index 1284e01..be85a19 100644 --- a/Documentation/typo3fluid/fluid/latest/Index.rst +++ b/Documentation/typo3fluid/fluid/latest/Index.rst @@ -5,7 +5,7 @@ typo3fluid/fluid ================ -* 25 ViewHelpers documented +* 26 ViewHelpers documented * 2 Sub namespaces .. toctree:: @@ -16,6 +16,7 @@ typo3fluid/fluid Alias Case Comment + Constant Count Cycle Debug