1 | <?php |
||
20 | class ExtendLayout implements BehaviourInterface |
||
21 | { |
||
22 | /** |
||
23 | * Parent (extended) node, treat it as page or element layout. |
||
24 | * |
||
25 | * @var Node |
||
26 | */ |
||
27 | private $parent = null; |
||
28 | |||
29 | /** |
||
30 | * Attributes defined using extends tag. |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | private $attributes = []; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | */ |
||
39 | private $token = []; |
||
40 | |||
41 | /** |
||
42 | * @param Node $parent |
||
43 | * @param array $token |
||
44 | */ |
||
45 | public function __construct(Node $parent, array $token) |
||
51 | |||
52 | /** |
||
53 | * Node which are getting extended. |
||
54 | * |
||
55 | * @return Node |
||
56 | */ |
||
57 | public function parentNode(): Node |
||
61 | |||
62 | /** |
||
63 | * Every importer defined in parent (extended node). |
||
64 | * |
||
65 | * @return ImporterInterface[] |
||
66 | */ |
||
67 | public function parentImports(): array |
||
76 | |||
77 | /** |
||
78 | * Set of blocks (attributes) defined at moment of extend definition. |
||
79 | * |
||
80 | * @return array |
||
81 | */ |
||
82 | public function getAttributes(): array |
||
86 | } |