From 995bd380ab6794d70364a842e9fbe05347f6dc0a Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Wed, 31 Jul 2024 10:43:31 +0200 Subject: [PATCH] [TASK] Move rest link chapters on separate pages --- .../Reference/ReStructuredText/Links/Api.rst | 70 +++++++++++++++++++ .../ReStructuredText/Links/_Api.rst.txt | 7 ++ .../Links/_ApiImplicit.rst.txt | 15 ++++ .../ReStructuredText/Links/_ApiShort.rst.txt | 11 +++ 4 files changed, 103 insertions(+) create mode 100644 Documentation/Reference/ReStructuredText/Links/Api.rst create mode 100644 Documentation/Reference/ReStructuredText/Links/_Api.rst.txt create mode 100644 Documentation/Reference/ReStructuredText/Links/_ApiImplicit.rst.txt create mode 100644 Documentation/Reference/ReStructuredText/Links/_ApiShort.rst.txt diff --git a/Documentation/Reference/ReStructuredText/Links/Api.rst b/Documentation/Reference/ReStructuredText/Links/Api.rst new file mode 100644 index 0000000..5597802 --- /dev/null +++ b/Documentation/Reference/ReStructuredText/Links/Api.rst @@ -0,0 +1,70 @@ +:navigation-title: API links + +.. _links-api: + +================================================ +API links: More information on TYPO3 PHP classes +================================================ + +At https://api.typo3.org/ all classes and interfaces of the +TYPO3 Core are listed with their public members and descriptions. The API +itself also links to the source code on GitHub. You can use implicit and +explicit links to these: + +.. contents:: + +.. _links-api-explicit: + +Explicit links to api.typo3.org +=============================== + +.. literalinclude:: _Api.rst.txt + +The links then look like this: + +.. include:: _Api.rst.txt + +Explicit links can use the interlink scheme to link to different TYPO3 versions. +If not specified they also link to the :confval:`guides-extension-typo3-core-preferred`. + +If you want to link directly to the source files on GitHub, you can use the +:ref:`:t3src: text role `. + +.. _links-api-fqn: + +Implicit links to fully-qualified names +======================================= + +Implicit links have the advantage that they show more information about the +class or interface in a popover while they still offer a link to the API. + +.. literalinclude:: _ApiImplicit.rst.txt + +The links then look like this: + +.. include:: _ApiImplicit.rst.txt + +As you can see, only links to the namespace `/TYPO3/CMS` can be linked to the +API. We do display general information about some other namespaces that are +commonly used in TYPO3 development. Example namespaces should always start with +`\MyVendor\`. Use `\MyVendor\MyExtension\` for extensions and +`\MyVendor\MySitepackage\` for sitepackages. + +Implicit links are always referring to your +:confval:`guides-extension-typo3-core-preferred` as set in the +:ref:`guides.xml `. + +.. _links-api-short: + +Links to the API with the short class name +========================================== + +Using the text role `php-short` you can display the short name of the class +or interface withing the text. Other then that it works just like the +:ref:`:php: ` text role. + +.. literalinclude:: _ApiShort.rst.txt + +The links then look like this: + +.. include:: _ApiShort.rst.txt diff --git a/Documentation/Reference/ReStructuredText/Links/_Api.rst.txt b/Documentation/Reference/ReStructuredText/Links/_Api.rst.txt new file mode 100644 index 0000000..f8f6266 --- /dev/null +++ b/Documentation/Reference/ReStructuredText/Links/_Api.rst.txt @@ -0,0 +1,7 @@ +.. Explicit links + +* :api-class:`\TYPO3\CMS\Extbase\Routing\ExtbasePluginEnhancer` +* :api-class:`In main ` +* :api-class:`In 11.5 ` +* :api-class:`\TYPO3\CMS\Core\EventDispatcher\EventDispatcher + ` diff --git a/Documentation/Reference/ReStructuredText/Links/_ApiImplicit.rst.txt b/Documentation/Reference/ReStructuredText/Links/_ApiImplicit.rst.txt new file mode 100644 index 0000000..7c34927 --- /dev/null +++ b/Documentation/Reference/ReStructuredText/Links/_ApiImplicit.rst.txt @@ -0,0 +1,15 @@ +.. Implicit links using the :php: text role: + +* :php:`\TYPO3\CMS\Adminpanel\Controller\AjaxController` +* :php:`\TYPO3\CMS\Core\Http\Dispatcher` +* :php:`\TYPO3\CMS\Adminpanel\ModuleApi\ContentProviderInterface` +* :php:`\TYPO3\CMS\Backend\Search\LiveSearch\SearchDemand\DemandPropertyName` +* :php:`\TYPO3\CMS\Backend\Form\Behavior\OnFieldChangeTrait` +* :php:`\Psr\Log\LoggerInterface` +* :php:`\TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper` +* :php:`\MyVendor\MyExtension\FooBar` +* :php:`\Foo\Bar\Something` + +.. prevent help text being displayed + +`This\Is\No\Class` diff --git a/Documentation/Reference/ReStructuredText/Links/_ApiShort.rst.txt b/Documentation/Reference/ReStructuredText/Links/_ApiShort.rst.txt new file mode 100644 index 0000000..2f2eb98 --- /dev/null +++ b/Documentation/Reference/ReStructuredText/Links/_ApiShort.rst.txt @@ -0,0 +1,11 @@ +.. Short PHP class names, still linking to the API: + +* :php-short:`\TYPO3\CMS\Adminpanel\Controller\AjaxController` +* :php-short:`\TYPO3\CMS\Core\Http\Dispatcher` +* :php-short:`\TYPO3\CMS\Adminpanel\ModuleApi\ContentProviderInterface` +* :php-short:`\TYPO3\CMS\Backend\Search\LiveSearch\SearchDemand\DemandPropertyName` +* :php-short:`\TYPO3\CMS\Backend\Form\Behavior\OnFieldChangeTrait` +* :php-short:`\Psr\Log\LoggerInterface` +* :php-short:`\TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper` +* :php-short:`\MyVendor\MyExtension\FooBar` +* :php-short:`\Foo\Bar\Something`