public static function getParentForm(BlockInterface $block)
    {
        $form = $block->getForm();

        if (null !== $form) {
            return $form;
        }

        return null !== $block->getParent()
            ? static::getParentForm($block->getParent())
            : null;
    }
public static function getParentForm(BlockInterface $block)
    {
        $form = $block->getForm();

        if (null !== $form) {
            return $form;
        }

        return null !== $block->getParent()
            ? static::getParentForm($block->getParent())
            : null;
    }
public static function getParentForm ( BlockInterface $ block ) { $ form = $ block -> getForm ( ) ; if ( null !== $ form ) { return $ form ; } return null !== $ block -> getParent ( ) ? static :: getParentForm ( $ block -> getParent ( ) ) : null ; }
Get the parent form.

@param BlockInterface $block

@return FormInterface|null
Get the parent form .