Skip to content

Commit 819e2b2

Browse files
authored
Merge pull request #47 from javiereguiluz/all_admonitions
Add all the missing RST admonitions
2 parents 96344ba + 031b228 commit 819e2b2

File tree

6 files changed

+95
-0
lines changed

6 files changed

+95
-0
lines changed

src/Directive/AttentionDirective.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Docs Builder package.
5+
* (c) Ryan Weaver <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
9+
10+
namespace SymfonyDocsBuilder\Directive;
11+
12+
class AttentionDirective extends AbstractAdmonitionDirective
13+
{
14+
public function __construct()
15+
{
16+
parent::__construct('attention', 'Attention');
17+
}
18+
}

src/Directive/DangerDirective.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Docs Builder package.
5+
* (c) Ryan Weaver <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
9+
10+
namespace SymfonyDocsBuilder\Directive;
11+
12+
class DangerDirective extends AbstractAdmonitionDirective
13+
{
14+
public function __construct()
15+
{
16+
parent::__construct('danger', 'Danger');
17+
}
18+
}

src/Directive/ErrorDirective.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Docs Builder package.
5+
* (c) Ryan Weaver <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
9+
10+
namespace SymfonyDocsBuilder\Directive;
11+
12+
class ErrorDirective extends AbstractAdmonitionDirective
13+
{
14+
public function __construct()
15+
{
16+
parent::__construct('error', 'Error');
17+
}
18+
}

src/Directive/HintDirective.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Docs Builder package.
5+
* (c) Ryan Weaver <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
9+
10+
namespace SymfonyDocsBuilder\Directive;
11+
12+
class HintDirective extends AbstractAdmonitionDirective
13+
{
14+
public function __construct()
15+
{
16+
parent::__construct('hint', 'Hint');
17+
}
18+
}

src/Directive/ImportantDirective.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Docs Builder package.
5+
* (c) Ryan Weaver <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
9+
10+
namespace SymfonyDocsBuilder\Directive;
11+
12+
class ImportantDirective extends AbstractAdmonitionDirective
13+
{
14+
public function __construct()
15+
{
16+
parent::__construct('important', 'Important');
17+
}
18+
}

src/KernelFactory.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,15 @@ private static function getDirectives(): array
6868
{
6969
return [
7070
new SymfonyDirectives\AdmonitionDirective(),
71+
new SymfonyDirectives\AttentionDirective(),
7172
new SymfonyDirectives\CautionDirective(),
7273
new SymfonyDirectives\CodeBlockDirective(),
7374
new SymfonyDirectives\ConfigurationBlockDirective(),
75+
new SymfonyDirectives\DangerDirective(),
7476
new SymfonyDirectives\DeprecatedDirective(),
77+
new SymfonyDirectives\ErrorDirective(),
78+
new SymfonyDirectives\HintDirective(),
79+
new SymfonyDirectives\ImportantDirective(),
7580
new SymfonyDirectives\IndexDirective(),
7681
new SymfonyDirectives\RoleDirective(),
7782
new SymfonyDirectives\NoteDirective(),

0 commit comments

Comments
 (0)