From 18ab5ded41b3bf471f93bcf5724552a75fa2bd74 Mon Sep 17 00:00:00 2001 From: Lina Wolf <48202465+linawolf@users.noreply.github.com> Date: Mon, 18 Mar 2024 19:03:42 +0100 Subject: [PATCH] [FEATURE] Show "Permalink to this definition" link (#40) As is shown by Sphinx. --- .../html/body/directive/php/case.html.twig | 1 + .../body/directive/php/component.html.twig | 1 + .../html/body/directive/php/const.html.twig | 1 + .../html/body/directive/php/global.html.twig | 1 + .../html/body/directive/php/method.html.twig | 1 + .../php/partials/linkToSnippet.html.twig | 1 + .../body/directive/php/property.html.twig | 1 + .../class-abstract/expected/index.html | 5 +-- .../class-final-abstract/expected/index.html | 5 +-- .../class-final/expected/index.html | 5 +-- .../expected/index.html | 11 ++++--- .../expected/index.html | 8 +++-- .../expected/index.html | 8 +++-- .../class-with-const-link/expected/index.html | 8 +++-- .../class-with-const/expected/index.html | 8 +++-- .../class-with-link/expected/index.html | 11 ++++--- .../expected/index.html | 17 ++++++---- .../expected/index.html | 11 ++++--- .../class-with-method/expected/index.html | 11 ++++--- .../expected/index.html | 7 ++-- .../expected/index.html | 8 +++-- .../class-with-property/expected/index.html | 10 ++++-- .../expected/index.html | 8 +++-- .../expected/index.html | 8 +++-- .../expected/index.html | 5 +-- .../expected/index.html | 11 ++++--- .../expected/index.html | 8 +++-- .../enum-with-cases-link/expected/index.html | 17 ++++++---- .../enum-with-cases/expected/index.html | 17 ++++++---- .../enum-with-constant/expected/index.html | 6 ++-- .../enum-with-link/expected/index.html | 8 +++-- .../enum-with-namespace/expected/index.html | 8 +++-- .../enum-with-warnings/expected/index.html | 20 ++++++++---- .../expected/index.html | 8 +++-- .../exception-directive/expected/index.html | 5 +-- .../expected/index.html | 5 +-- .../exception-with-link/expected/index.html | 5 +-- .../global-variable/expected/index.html | 3 +- .../expected/index.html | 5 +-- .../interface-link/expected/index.html | 5 +-- .../expected/index.html | 8 +++-- .../interface-with-const/expected/index.html | 6 ++-- .../interface-with-method/expected/index.html | 11 ++++--- .../expected/index.html | 5 +-- .../expected/index.html | 17 ++++++---- .../expected/index.html | 32 ++++++++++++------- .../expected/index.html | 5 +-- .../method-returns/expected/index.html | 5 +-- .../static-method/expected/index.html | 5 +-- .../trait-directive/expected/index.html | 12 ++++--- .../trait-with-link/expected/index.html | 12 ++++--- 51 files changed, 271 insertions(+), 139 deletions(-) create mode 100644 resources/template/html/body/directive/php/partials/linkToSnippet.html.twig diff --git a/resources/template/html/body/directive/php/case.html.twig b/resources/template/html/body/directive/php/case.html.twig index 2b53930..aa49025 100644 --- a/resources/template/html/body/directive/php/case.html.twig +++ b/resources/template/html/body/directive/php/case.html.twig @@ -2,6 +2,7 @@
Lorem Ipsum Dolor!
Lorem Ipsum Dolor!
Lorem Ipsum Dolor!
Lorem Ipsum Dolor!
Lorem Ipsum Dolor Another!
Lorem Ipsum Dolor Yet Another!
Where Fun Knows No Bounds!
The constant that encapsulates pure joy and laughter. Whenever you need a pick-me-up, just access JOY_CONSTANT and let the chuckles begin.
A dynamic constant that measures the giggle intensity in the ChuckleFactory. It's known to spontaneously increase during code reviews and coffee breaks.
Unleash the power of whimsy! This constant is your key to unlocking the whimsical wonders hidden within the FunClass. Expect surprises and delight!
Unveiling the mysteries of constants!
The eternal symbol representing the ratio of a circle's circumference to its diameter. Also used as the secret handshake among mathematicians.
This constant holds the secret number known only to members of the EnigmaticClass. Rumor has it, it's the combination to the ultimate @@ -37,6 +40,7 @@
The eternal flame, kept alight by the power of mystical constants. Its warmth is known only to those who dare to delve into the deepest realms diff --git a/tests/integration/class-with-const-link/expected/index.html b/tests/integration/class-with-const-link/expected/index.html index 6f016ff..f3a338e 100644 --- a/tests/integration/class-with-const-link/expected/index.html +++ b/tests/integration/class-with-const-link/expected/index.html @@ -1,6 +1,6 @@
Unveiling the mysteries of constants!
The eternal symbol representing the ratio of a circle's circumference to its diameter. Also used as the secret handshake among mathematicians.
This constant holds the secret number known only to members of the EnigmaticClass. Rumor has it, it's the combination to the ultimate @@ -37,6 +40,7 @@
The eternal flame, kept alight by the power of mystical constants. Its warmth is known only to those who dare to delve into the deepest realms diff --git a/tests/integration/class-with-const/expected/index.html b/tests/integration/class-with-const/expected/index.html index 876006d..1d6d51f 100644 --- a/tests/integration/class-with-const/expected/index.html +++ b/tests/integration/class-with-const/expected/index.html @@ -1,6 +1,6 @@
Unveiling the mysteries of constants!
The eternal symbol representing the ratio of a circle's circumference to its diameter. Also used as the secret handshake among mathematicians.
This constant holds the secret number known only to members of the EnigmaticClass. Rumor has it, it's the combination to the ultimate @@ -37,6 +40,7 @@
The eternal flame, kept alight by the power of mystical constants. Its warmth is known only to those who dare to delve into the deepest realms diff --git a/tests/integration/class-with-link/expected/index.html b/tests/integration/class-with-link/expected/index.html index 461b501..7290183 100644 --- a/tests/integration/class-with-link/expected/index.html +++ b/tests/integration/class-with-link/expected/index.html @@ -1,6 +1,6 @@
Lorem Ipsum Dolor!
Set the date.
Get the date.
Lorem Ipsum Dolor!
Set the date.
Get the date.
Lorem Ipsum Dolor!
Set the date.
Get the date.
Lorem Ipsum Dolor!
Set the date.
Get the date.
Welcome to the magical workshop of JollyElves, spreading cheer and joy!
The color of the elf's festive hat, radiating holiday spirit. Can Improve the JollyElf::$giftCount.
The count of gifts wrapped by the JollyElf, a closely guarded secret.
Welcome to the gloomy world of GrumpyGoblins, spreading grumbles and dissatisfaction!
The grumpy goblin's hidden secret. Publicly private - an illegal combination!
The ancient curse haunting all GrumpyGoblins. A static readonly curse - an illegal combination!
The deprecated complaint box, once used by GrumpyGoblins to voice their discontent.
Welcome to the magical workshop of JollyElves, spreading cheer and joy!
The color of the elf's festive hat, radiating holiday spirit.
The count of gifts wrapped by the JollyElf, a closely guarded secret.
Whether the sleigh bells on the elf's shoes are jingling merrily.
The total count of gifts wrapped by all JollyElves in the workshop.
The year the JollyElf joyfully joined the festive workshop.
Lorem Ipsum Dolor!
Do something
Unveiling the mysteries of constants!
The eternal symbol representing the ratio of a circle's circumference to its diameter. Also used as the secret handshake among mathematicians.
This constant holds the secret number known only to members of the EnigmaticClass. Rumor has it, it's the combination to the ultimate @@ -37,6 +40,7 @@
The eternal flame, kept alight by the power of mystical constants. Its warmth is known only to those who dare to delve into the deepest realms diff --git a/tests/integration/class-without-namespace/expected/index.html b/tests/integration/class-without-namespace/expected/index.html index 6f85e81..3abda02 100644 --- a/tests/integration/class-without-namespace/expected/index.html +++ b/tests/integration/class-without-namespace/expected/index.html @@ -1,13 +1,14 @@
Lorem Ipsum Dolor!
In playing cards, a suit is one of the categories into which the cards of a deck are divided.
Hearts is one of the four suits in playing cards.
Diamonds is one of the four suits in playing cards.
some stuff
another stuff
In playing cards, a suit is one of the categories into which the cards of a deck are divided.
Hearts is one of the four suits in playing cards. It is red just like Suit::Diamonds.
Diamonds is one of the four suits in playing cards.
Clubs is one of the four suits in playing cards.
Spades is one of the four suits in playing cards.
In playing cards, a suit is one of the categories into which the cards of a deck are divided.
Hearts is one of the four suits in playing cards.
Diamonds is one of the four suits in playing cards.
Clubs is one of the four suits in playing cards.
Spades is one of the four suits in playing cards.
some stuff
represents the ratio of a circle's circumference to its diameter
some stuff
another stuff
some stuff
another stuff
In playing cards, a suit is one of the categories into which the cards of a deck are divided.
Hearts is one of the four suits in playing cards.
Diamonds is one of the four suits in playing cards.
Clubs is one of the four suits in playing cards.
Spades is one of the four suits in playing cards.
some stuff
another stuff
Exception for root line traversal when a page within the root line traversal is missing / can not be resolved.
diff --git a/tests/integration/exception-with-link-deprecated/expected/index.html b/tests/integration/exception-with-link-deprecated/expected/index.html index fdcd2bb..4198281 100644 --- a/tests/integration/exception-with-link-deprecated/expected/index.html +++ b/tests/integration/exception-with-link-deprecated/expected/index.html @@ -1,6 +1,6 @@Exception for root line traversal when a page within the root line traversal is missing / can not be resolved.
diff --git a/tests/integration/exception-with-link/expected/index.html b/tests/integration/exception-with-link/expected/index.html index fdcd2bb..4198281 100644 --- a/tests/integration/exception-with-link/expected/index.html +++ b/tests/integration/exception-with-link/expected/index.html @@ -1,6 +1,6 @@Exception for root line traversal when a page within the root line traversal is missing / can not be resolved.
diff --git a/tests/integration/global-variable/expected/index.html b/tests/integration/global-variable/expected/index.html index e34b058..4c7b50d 100644 --- a/tests/integration/global-variable/expected/index.html +++ b/tests/integration/global-variable/expected/index.html @@ -1,12 +1,13 @@Contains the TYPO3 Configuration Array
diff --git a/tests/integration/interface-implicit-namespace/expected/index.html b/tests/integration/interface-implicit-namespace/expected/index.html index 013e5d0..dbd2a03 100644 --- a/tests/integration/interface-implicit-namespace/expected/index.html +++ b/tests/integration/interface-implicit-namespace/expected/index.html @@ -1,6 +1,6 @@Lorem Ipsum Dolor!
Lorem Ipsum Dolor!
Lorem Ipsum Dolor!
Lorem Ipsum Dolor Another!
Lorem Ipsum Dolor!
The ATOM
Lorem Ipsum Dolor!
Set the date.
Get the date.
Lorem Ipsum Dolor!
Do something
Do something
Do something
Do something
Do something
Do something
Do something
Do something
Do something
Do something
Do something
Do something
Do something
Do something
Do something
Get the date.
Lorem Ipsum
Do something