| 1 | <?php |
||
| 10 | * Class AlignmentNode. |
||
| 11 | */ |
||
| 12 | class AlignmentNode extends BaseNode |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $alignment; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * AlignmentNode constructor. |
||
| 21 | * |
||
| 22 | * @param array $nodes |
||
| 23 | * @param array $attributes |
||
| 24 | * @param int $lineNo |
||
| 25 | * @param string|null $tag |
||
| 26 | * @param string $alignment |
||
| 27 | * |
||
| 28 | * @throws InvalidArgumentException |
||
| 29 | */ |
||
| 30 | public function __construct(array $nodes = [], array $attributes = [], int $lineNo = 0, string $tag = null, string $alignment = HeaderFooterWrapper::ALIGNMENT_CENTER) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param Twig_Compiler $compiler |
||
| 39 | */ |
||
| 40 | public function compile(Twig_Compiler $compiler) |
||
| 53 | |||
| 54 | /** |
||
| 55 | * {@inheritdoc} |
||
| 56 | */ |
||
| 57 | public function getAllowedParents(): array |
||
| 58 | { |
||
| 59 | return [ |
||
| 60 | HeaderFooterNode::class, |
||
| 61 | ]; |
||
| 62 | } |
||
| 64 |