Files
archived-doctrine-website/lib/RST/Directive/WarningDirective.php
2018-08-24 04:50:22 +01:00

32 lines
722 B
PHP

<?php
declare(strict_types=1);
namespace Doctrine\Website\RST\Directive;
use Doctrine\RST\Nodes\Node;
use Doctrine\RST\Nodes\WrapperNode;
use Doctrine\RST\Parser;
use Doctrine\RST\SubDirective;
class WarningDirective extends SubDirective
{
public function getName() : string
{
return 'warning';
}
/**
* @param string[] $options
*/
public function processSub(
Parser $parser,
?Node $document,
string $variable,
string $data,
array $options
) : ?Node {
return new WrapperNode($document, '<div class="alert warning bg-light-yellow text-dark border"><i class="fas fa-exclamation-circle text-warning mr-2"></i>', '</div>');
}
}