Skip to content

Commit 2344d8e

Browse files
jaapiolinawolf
authored andcommitted
[DOCS] Add admonition directive docs
1 parent 2b1f9c6 commit 2344d8e

File tree

10 files changed

+111
-1
lines changed

10 files changed

+111
-1
lines changed

src/RestructuredText/Directives/AttentionDirective.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515

1616
use phpDocumentor\Guides\RestructuredText\Parser\Productions\Rule;
1717

18+
/**
19+
* Directive to create an attention admonition.
20+
*
21+
* Example:
22+
*
23+
* ```rest
24+
* .. attention::
25+
*
26+
* This is an attention admonition.
27+
* ```
28+
*/
1829
final class AttentionDirective extends AbstractAdmonitionDirective
1930
{
2031
public function __construct(protected Rule $startingRule)

src/RestructuredText/Directives/CautionDirective.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515

1616
use phpDocumentor\Guides\RestructuredText\Parser\Productions\Rule;
1717

18+
/**
19+
* Directive to create a caution admonition.
20+
*
21+
* Example:
22+
*
23+
* ```rest
24+
* .. caution::
25+
*
26+
* This is a caution admonition.
27+
* ```
28+
*/
1829
final class CautionDirective extends AbstractAdmonitionDirective
1930
{
2031
public function __construct(protected Rule $startingRule)

src/RestructuredText/Directives/DangerDirective.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,18 @@
1515

1616
use phpDocumentor\Guides\RestructuredText\Parser\Productions\Rule;
1717

18-
final class DangerDirective extends AbstractAdmonitionDirective
18+
/**
19+
* Directive to create a danger admonition.
20+
*
21+
* Example:
22+
*
23+
* ```rest
24+
* .. danger::
25+
*
26+
* This is a danger admonition.
27+
* ```
28+
*/
29+
class DangerDirective extends AbstractAdmonitionDirective
1930
{
2031
public function __construct(protected Rule $startingRule)
2132
{

src/RestructuredText/Directives/ErrorDirective.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515

1616
use phpDocumentor\Guides\RestructuredText\Parser\Productions\Rule;
1717

18+
/**
19+
* Directive to create a error admonition.
20+
*
21+
* Example:
22+
*
23+
* ```rest
24+
* .. error::
25+
*
26+
* This is an error admonition.
27+
* ```
28+
*/
1829
final class ErrorDirective extends AbstractAdmonitionDirective
1930
{
2031
public function __construct(protected Rule $startingRule)

src/RestructuredText/Directives/HintDirective.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515

1616
use phpDocumentor\Guides\RestructuredText\Parser\Productions\Rule;
1717

18+
/**
19+
* Directive to create a hint admonition.
20+
*
21+
* Example:
22+
*
23+
* ```rest
24+
* .. hint::
25+
*
26+
* This is a hint admonition.
27+
* ```
28+
*/
1829
final class HintDirective extends AbstractAdmonitionDirective
1930
{
2031
public function __construct(protected Rule $startingRule)

src/RestructuredText/Directives/ImportantDirective.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515

1616
use phpDocumentor\Guides\RestructuredText\Parser\Productions\Rule;
1717

18+
/**
19+
* Directive to create a important admonition.
20+
*
21+
* Example:
22+
*
23+
* ```rest
24+
* .. important::
25+
*
26+
* This is a important admonition.
27+
* ```
28+
*/
1829
final class ImportantDirective extends AbstractAdmonitionDirective
1930
{
2031
public function __construct(protected Rule $startingRule)

src/RestructuredText/Directives/NoteDirective.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515

1616
use phpDocumentor\Guides\RestructuredText\Parser\Productions\Rule;
1717

18+
/**
19+
* Directive to create a note admonition.
20+
*
21+
* Example:
22+
*
23+
* ```rest
24+
* .. note::
25+
*
26+
* This is a note admonition.
27+
* ```
28+
*/
1829
final class NoteDirective extends AbstractAdmonitionDirective
1930
{
2031
public function __construct(protected Rule $startingRule)

src/RestructuredText/Directives/SeeAlsoDirective.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515

1616
use phpDocumentor\Guides\RestructuredText\Parser\Productions\Rule;
1717

18+
/**
19+
* Directive to create a seealso admonition.
20+
*
21+
* Example:
22+
*
23+
* ```rest
24+
* .. seealso::
25+
*
26+
* This is a seealso admonition.
27+
* ```
28+
*/
1829
final class SeeAlsoDirective extends AbstractAdmonitionDirective
1930
{
2031
public function __construct(protected Rule $startingRule)

src/RestructuredText/Directives/TipDirective.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515

1616
use phpDocumentor\Guides\RestructuredText\Parser\Productions\Rule;
1717

18+
/**
19+
* Directive to create a tip admonition.
20+
*
21+
* Example:
22+
*
23+
* ```rest
24+
* .. tip::
25+
*
26+
* This is a tip admonition.
27+
* ```
28+
*/
1829
final class TipDirective extends AbstractAdmonitionDirective
1930
{
2031
public function __construct(protected Rule $startingRule)

src/RestructuredText/Directives/WarningDirective.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515

1616
use phpDocumentor\Guides\RestructuredText\Parser\Productions\Rule;
1717

18+
/**
19+
* Directive to create a warning admonition.
20+
*
21+
* Example:
22+
*
23+
* ```rest
24+
* .. warning::
25+
*
26+
* This is a warning admonition.
27+
* ```
28+
*/
1829
final class WarningDirective extends AbstractAdmonitionDirective
1930
{
2031
public function __construct(protected Rule $startingRule)

0 commit comments

Comments
 (0)