| 1 | <?php |
||
| 12 | abstract class AbstractElement implements Element |
||
| 13 | { |
||
| 14 | use Properties; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $view; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var MenuRender |
||
| 23 | */ |
||
| 24 | protected $render; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @inheritdoc |
||
| 28 | */ |
||
| 29 | 1 | public function getView() |
|
| 30 | { |
||
| 31 | 1 | return $this->view; |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @inheritdoc |
||
| 36 | */ |
||
| 37 | 1 | public function setView($view) |
|
| 38 | { |
||
| 39 | 1 | if ($this->render->exists($view)) { |
|
| 40 | 1 | $this->view = $view; |
|
| 41 | } |
||
| 42 | 1 | } |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @inheritDoc |
||
| 46 | */ |
||
| 47 | 3 | public function toArray() |
|
| 53 | } |