Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
17 | public function buildView(FormView $view, FormInterface $form, array $options) |
||
18 | { |
||
19 | /** @var FormInterface | ClickableInterface $form */ |
||
20 | if (!$form instanceof ClickableInterface) { |
||
21 | return; |
||
22 | } |
||
23 | |||
24 | $viewRoot = FormHelper::getViewRoot($view); |
||
25 | if (!$this->hasRuleBuilderContext($viewRoot)) { |
||
26 | return; |
||
27 | } |
||
28 | |||
29 | /** @var FormRuleContextBuilder $context */ |
||
30 | $context = $viewRoot->vars['rule_builder']; |
||
31 | $context->addButton($view, FormHelper::getValidationGroups($form)); |
||
32 | } |
||
33 | |||
47 |