Skip to content

Commit

Permalink
[TASK] Migrate existing ViewHelper docs to valid rst
Browse files Browse the repository at this point in the history
* In order to allow proper rendering at docs.typo3.org
* Only migrated HTML to rst, and streamlined structure.

Resolves: #86855
Releases: master, 9.5
Change-Id: Ia617d24b0e70182b8702b23a340ad1f2b536910e
Reviewed-on: https://review.typo3.org/c/58844
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
  • Loading branch information
DanielSiepmann authored and maddy2101 committed Feb 23, 2019
1 parent 7af4a98 commit 9116fcd
Show file tree
Hide file tree
Showing 81 changed files with 1,298 additions and 1,219 deletions.
Expand Up @@ -14,16 +14,18 @@
* The uid must be given as a positive integer.
* For new records, use the newRecordViewHelper
*
* = Examples =
* Examples
* --------
*
* <code title="Link to the record-edit action passed to FormEngine">
* <be:link.editRecord uid="42" table="a_table" returnUrl="foo/bar" />
* </code>
* <output>
* <a href="/typo3/index.php?route=/record/edit&edit[a_table][42]=edit&returnUrl=foo/bar">
* Edit record
* </a>
* </output>
* Link to the record-edit action passed to FormEngine::
*
* <be:link.editRecord uid="42" table="a_table" returnUrl="foo/bar" />
*
* Output::
*
* <a href="/typo3/index.php?route=/record/edit&edit[a_table][42]=edit&returnUrl=foo/bar">
* Edit record
* </a>
*/
class EditRecordViewHelper extends AbstractTagBasedViewHelper
{
Expand Down
Expand Up @@ -26,34 +26,38 @@
*
* To edit records, use the editRecordViewHelper
*
* = Examples =
*
* <code title="Link to create a new record of a_table after record 17 on the same pid">
* <be:link.newRecord table="a_table" returnUrl="foo/bar" uid="-17"/>
* </code>
* <output>
* <a href="/typo3/index.php?route=/record/edit&edit[a_table][-17]=new&returnUrl=foo/bar">
* Edit record
* </a>
* </output>
*
* <code title="Link to create a new record of a_table on root page">
* <be:link.newRecord table="a_table" returnUrl="foo/bar""/>
* </code>
* <output>
* <a href="/typo3/index.php?route=/record/edit&edit[a_table][]=new&returnUrl=foo/bar">
* Edit record
* </a>
* </output>
*
* <code title="Link to create a new record of a_table on page 17">
* <be:link.newRecord table="a_table" returnUrl="foo/bar" pid="17"/>
* </code>
* <output>
* <a href="/typo3/index.php?route=/record/edit&edit[a_table][-17]=new&returnUrl=foo/bar">
* Edit record
* </a>
* </output>
* Examples
* --------
*
* Link to create a new record of a_table after record 17 on the same pid::
*
* <be:link.newRecord table="a_table" returnUrl="foo/bar" uid="-17"/>
*
* Output::
*
* <a href="/typo3/index.php?route=/record/edit&edit[a_table][-17]=new&returnUrl=foo/bar">
* Edit record
* </a>
*
* Link to create a new record of a_table on root page::
*
* <be:link.newRecord table="a_table" returnUrl="foo/bar""/>
*
* Output::
*
* <a href="/typo3/index.php?route=/record/edit&edit[a_table][]=new&returnUrl=foo/bar">
* Edit record
* </a>
*
* Link to create a new record of a_table on page 17::
*
* <be:link.newRecord table="a_table" returnUrl="foo/bar" pid="17"/>
*
* Output::
*
* <a href="/typo3/index.php?route=/record/edit&edit[a_table][-17]=new&returnUrl=foo/bar">
* Edit record
* </a>
*/
class NewRecordViewHelper extends AbstractTagBasedViewHelper
{
Expand Down
Expand Up @@ -22,16 +22,19 @@
/**
* A view helper for adding a link button to the doc header area.
* It must be a child of <be:moduleLayout>
* = Examples =
* <code>
* <be:moduleLayout>
*
* Examples
* --------
*
* Default::
*
* <be:moduleLayout>
* <be:moduleLayout.button.linkButton
* icon="actions-add"
* title="Add record')}"
* link="{be:uri.newRecord(table: 'tx_my_table')}"
* />
* </be:moduleLayout>
* </code>
* </be:moduleLayout>
*/
class LinkButtonViewHelper extends AbstractButtonViewHelper
{
Expand Down
Expand Up @@ -25,12 +25,15 @@
/**
* A view helper for adding a shortcut button to the doc header area.
* It must be a child of <be:moduleLayout>
* = Examples =
* <code>
* <be:moduleLayout>
*
* Examples
* --------
*
* Default::
*
* <be:moduleLayout>
* <be:moduleLayout.button.shortcutButton displayName="Shortcut label" />
* </be:moduleLayout>
* </code>
* </be:moduleLayout>
*/
class ShortcutButtonViewHelper extends AbstractButtonViewHelper
{
Expand Down
Expand Up @@ -27,14 +27,17 @@
/**
* A view helper for adding a menu item to a doc header menu.
* It must be a child of <be:moduleLayout.menu>
* = Examples =
* <code>
* <be:moduleLayout>
*
* Examples
* --------
*
* Default::
*
* <be:moduleLayout>
* <be:moduleLayout.menu identifier="MenuIdentifier">
* <be:moduleLayout.menuItem label="Menu item 1" uri="{f:uri.action(action: 'index')}"/>
* </be:moduleLayout.menu>
* </be:moduleLayout>
* </code>
* </be:moduleLayout>
*/
class MenuItemViewHelper extends AbstractViewHelper
{
Expand Down
Expand Up @@ -28,14 +28,17 @@
* A view helper for adding a menu to the doc header area.
* It must be a child of <be:moduleLayout> and accepts
* only <be:moduleLayout.menuItem> view helpers as children.
* = Examples =
* <code>
* <be:moduleLayout>
*
* Examples
* --------
*
* Default::
*
* <be:moduleLayout>
* <be:moduleLayout.menu identifier="MenuIdentifier">
* <be:moduleLayout.menuItem label="Menu item 1" uri="{f:uri.action(action: 'index')}"/>
* </be:moduleLayout.menu>
* </be:moduleLayout>
* </code>
* </be:moduleLayout>
*/
class MenuViewHelper extends AbstractViewHelper
{
Expand Down
Expand Up @@ -28,15 +28,19 @@
* It will render the required HTML for the doc header.
* All module specific output and further configuration of the doc header
* must be rendered as children of this view helper.
* = Examples =
* <code>
* <be:moduleLayout>
*
* Examples
* ========
*
* Default::
*
* <be:moduleLayout>
* <f:render section="content" />
* </be:moduleLayout>
* </code>
* <output>
* <!-- HTML of the backend module -->
* </output>
* </be:moduleLayout>
*
* Output::
*
* <!-- HTML of the backend module -->
*/
class ModuleLayoutViewHelper extends AbstractViewHelper
{
Expand Down
Expand Up @@ -16,14 +16,14 @@
* The uid must be given as a positive integer.
* For new records, use the newRecordViewHelper
*
* = Examples =
* Examples
* ========
*
* <code title="URI to the record-edit action passed to FormEngine">
* <be:uri.editRecord uid="42" table="a_table" returnUrl="foo/bar" />
* </code>
* <output>
* /typo3/index.php?route=/record/edit&edit[a_table][42]=edit&returnUrl=foo/bar
* </output>
* URI to the record-edit action passed to FormEngine::
*
* <be:uri.editRecord uid="42" table="a_table" returnUrl="foo/bar" />
*
* ``/typo3/index.php?route=/record/edit&edit[a_table][42]=edit&returnUrl=foo/bar``
*/
class EditRecordViewHelper extends AbstractViewHelper
{
Expand Down
Expand Up @@ -28,28 +28,26 @@
*
* To edit records, use the editRecordViewHelper
*
* = Examples =
* Examples
* ========
*
* <code title="Uri to create a new record of a_table after record 17 on the same pid">
* <be:uri.newRecord table="a_table" returnUrl="foo/bar" uid="-17"/>
* </code>
* <output>
* /typo3/index.php?route=/record/edit&edit[a_table][-17]=new&returnUrl=foo/bar
* </output>
* Uri to create a new record of a_table after record 17 on the same pid::
*
* <code title="Uri to create a new record of a_table on root page">
* <be:uri.newRecord table="a_table" returnUrl="foo/bar""/>
* </code>
* <output>
* /typo3/index.php?route=/record/edit&edit[a_table][]=new&returnUrl=foo/bar
* </output>
* <be:uri.newRecord table="a_table" returnUrl="foo/bar" uid="-17"/>
*
* <code title="Uri to create a new record of a_table on page 17">
* <be:uri.newRecord table="a_table" returnUrl="foo/bar" pid="17"/>
* </code>
* <output>
* /typo3/index.php?route=/record/edit&edit[a_table][-17]=new&returnUrl=foo/bar
* </output>
* ``/typo3/index.php?route=/record/edit&edit[a_table][-17]=new&returnUrl=foo/bar``
*
* Uri to create a new record of a_table on root page::
*
* <be:uri.newRecord table="a_table" returnUrl="foo/bar""/>
*
* ``/typo3/index.php?route=/record/edit&edit[a_table][]=new&returnUrl=foo/bar``
*
* Uri to create a new record of a_table on page 17::
*
* <be:uri.newRecord table="a_table" returnUrl="foo/bar" pid="17"/>
*
* ``/typo3/index.php?route=/record/edit&edit[a_table][-17]=new&returnUrl=foo/bar``
*/
class NewRecordViewHelper extends AbstractTagBasedViewHelper
{
Expand Down
17 changes: 10 additions & 7 deletions typo3/sysext/fluid/Classes/ViewHelpers/BaseViewHelper.php
Expand Up @@ -23,15 +23,18 @@
* current request.
* In TYPO3 Flow, you should always include this ViewHelper to make the links work.
*
* = Examples =
* Examples
* --------
*
* Example::
*
* <f:base />
*
* Output::
*
* <base href="http://yourdomain.tld/" />
*
* <code title="Example">
* <f:base />
* </code>
* <output>
* <base href="http://yourdomain.tld/" />
* (depending on your domain)
* </output>
*/
class BaseViewHelper extends AbstractViewHelper
{
Expand Down
34 changes: 16 additions & 18 deletions typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/CshViewHelper.php
Expand Up @@ -24,30 +24,28 @@
* set to something else than "Display no help information" in the Users settings
* Note: This view helper is experimental!
*
* = Examples =
* Examples
* --------
*
* Default::
*
* <f:be.buttons.csh />
*
* <code title="Default">
* <f:be.buttons.csh />
* </code>
* <output>
* CSH button as known from the TYPO3 backend.
* </output>
*
* <code title="Full configuration">
* <f:be.buttons.csh table="xMOD_csh_corebe" field="someCshKey" />
* </code>
* <output>
* Full configuration::
*
* <f:be.buttons.csh table="xMOD_csh_corebe" field="someCshKey" />
*
* CSH button as known from the TYPO3 backend with some custom settings.
* </output>
*
* <code title="Full configuration with content">
* <f:be.buttons.csh table="xMOD_csh_corebe" field="someCshKey">
* some text to link
* </f:be.buttons.csh>
* </code>
* <output>
* Full configuration with content::
*
* <f:be.buttons.csh table="xMOD_csh_corebe" field="someCshKey">
* some text to link
* </f:be.buttons.csh>
*
* A link with text "some text to link" to link the help
* </output>
*/
class CshViewHelper extends AbstractBackendViewHelper
{
Expand Down
Expand Up @@ -23,25 +23,26 @@
* View helper which returns shortcut button with icon
* Note: This view helper is experimental!
*
* = Examples =
* Examples
* --------
*
* Default::
*
* <f:be.buttons.shortcut />
*
* <code title="Default">
* <f:be.buttons.shortcut />
* </code>
* <output>
* Shortcut button as known from the TYPO3 backend.
* By default the current page id, module name and all module arguments will be stored
* </output>
*
* <code title="Explicitly set parameters to be stored in the shortcut">
* <f:be.buttons.shortcut getVars="{0: 'route', 1: 'myOwnPrefix'}" setVars="{0: 'function'}" />
* </code>
* <output>
* Explicitly set parameters to be stored in the shortcut::
*
* <f:be.buttons.shortcut getVars="{0: 'route', 1: 'myOwnPrefix'}" setVars="{0: 'function'}" />
*
* Shortcut button as known from the TYPO3 backend.
* This time only the specified GET parameters and SET[]-settings will be stored.
* Note:
* Normally you won't need to set getVars & setVars parameters in Extbase modules
* </output>
*
* .. note:
*
* Normally you won't need to set getVars & setVars parameters in Extbase modules
*/
class ShortcutViewHelper extends AbstractBackendViewHelper
{
Expand Down

0 comments on commit 9116fcd

Please sign in to comment.