protected function injectFormCell(BlockView $view, BlockInterface $block)
    {
        $section = BlockViewUtil::getParent($view, 'panel_section');

        if (null !== $section
                && $section->vars['rendered']
                && $view->vars['rendered']
                && null !== $formPath = $block->getConfig()->getAttribute('form_name')) {
            $parentForm = BlockFormUtil::getParentFormView($view);

            if (null !== $parentForm) {
                $formNames = explode('.', $formPath);
                $formCell = $parentForm;

                foreach ($formNames as $formName) {
                    $formCell = $formCell->children[$formName];
                }

                if (null !== $formCell && $formCell !== $parentForm) {
                    $view->vars['form_cell'] = $formCell;
                }
            }
        }
    }