1 | <?php |
||
28 | class HasViewHelper extends AbstractConditionViewHelper implements CompilableInterface |
||
29 | { |
||
30 | /** |
||
31 | * @var FieldViewHelperService |
||
32 | */ |
||
33 | protected $fieldService; |
||
34 | |||
35 | /** |
||
36 | * @inheritdoc |
||
37 | */ |
||
38 | public function initializeArguments() |
||
42 | |||
43 | /** |
||
44 | * @inheritdoc |
||
45 | */ |
||
46 | protected function callRenderMethod() |
||
47 | { |
||
48 | if (false === $this->fieldService->fieldContextExists()) { |
||
49 | throw ContextNotFoundException::slotHasViewHelperFieldContextNotFound(); |
||
50 | } |
||
51 | |||
52 | return parent::callRenderMethod(); |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @param array $arguments |
||
57 | * @return bool |
||
58 | */ |
||
59 | protected static function evaluateCondition($arguments = null) |
||
67 | |||
68 | /** |
||
69 | * @param FieldViewHelperService $service |
||
70 | */ |
||
71 | public function injectFieldService(FieldViewHelperService $service) |
||
75 | } |
||
76 |