-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Move rest link chapters on separate pages
- Loading branch information
Showing
4 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <linking-core-source>`. | ||
|
||
.. _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 <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: <links-api-fqn>` text role. | ||
|
||
.. literalinclude:: _ApiShort.rst.txt | ||
|
||
The links then look like this: | ||
|
||
.. include:: _ApiShort.rst.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.. Explicit links | ||
* :api-class:`\TYPO3\CMS\Extbase\Routing\ExtbasePluginEnhancer` | ||
* :api-class:`In main <api-dev:\TYPO3\CMS\Extbase\Routing\ExtbasePluginEnhancer>` | ||
* :api-class:`In 11.5 <api-11:\TYPO3\CMS\Extbase\Routing\ExtbasePluginEnhancer>` | ||
* :api-class:`\TYPO3\CMS\Core\EventDispatcher\EventDispatcher | ||
<api:\TYPO3\CMS\Core\EventDispatcher\EventDispatcher>` |
15 changes: 15 additions & 0 deletions
15
Documentation/Reference/ReStructuredText/Links/_ApiImplicit.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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` |
11 changes: 11 additions & 0 deletions
11
Documentation/Reference/ReStructuredText/Links/_ApiShort.rst.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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` |