Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarifiy "PHP domain" / Linking to PHP entities #289

Open
8 tasks
sypets opened this issue Jun 12, 2022 · 0 comments
Open
8 tasks

Clarifiy "PHP domain" / Linking to PHP entities #289

sypets opened this issue Jun 12, 2022 · 0 comments

Comments

@sypets
Copy link
Contributor

sypets commented Jun 12, 2022

About the page in general

https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/WritingReST/Phpdomain.html

  • Explain what it does and what it is about
  • What is "PHP domain"

PHP domain
In order to describe PHP code in TYPO3’s documentation, the Sphinx extension sphinxcontrib-phpdomain is integrated into the rendering process.

That is a bit difficult to understand if one is not familiar with these terms. What is "PHP domain"?

About the section "Linking to PHP entities"

https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/WritingReST/Phpdomain.html#linking-to-php-entities

This section is not entirely clear to me at first. I think you can figure this out, but might be helpful to explain it more.

  • "Linking to PHP entities" - what are PHP entitites? We use that term here, but it is not used or explained above
  • The title is "linking to", there are links generated but these are not styled as links, so visually it actually looks like inline code. Maybe explain that.
  • We used to use :php: as inline code roles for classes, methods etc. What is the difference here, why use the new markup and what is the result?
  • Also add TABs so you have 2 views: code and how it looks
  • when should :php:any: be used?

In the example, we have both :any: and :php:class: with the same class:

*  :php:class:`Vendor\\Extension\\DateTime`

...

*  :any:`Vendor\\Extension\\DateTime`

That might be confusing

  • maybe a description of the inline code labels. For some it is obvious (class), for some probably obvious (ns=namespace), (exc=exception)
:php:exc:`TYPO3\\CMS\\Core\\Exception\\Page\\BrokenRootLineException`
:php:ns:`TYPO3\\CMS\\Core\\Exception\\Page`
:php:class:`Vendor\\Extension\\DateTime`
:php:class:`TYPO3\\CMS\\Seo\\Event\\ModifyUrlForCanonicalTagEvent`
  • sometimes double \ (esacaped ) are used in the class names, sometimes not - maybe explain where and why (everything you understand, you don't have to memorize)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant