protected function getFormFromView(View $view)
    {
        $data = $view->getData();

        if ($data instanceof FormInterface) {
            return $data;
        }

        if (is_array($data) && isset($data['form']) && $data['form'] instanceof FormInterface) {
            return $data['form'];
        }

        return false;
    }
protected function getFormFromView(View $view)
    {
        $data = $view->getData();

        if ($data instanceof FormInterface) {
            return $data;
        }

        if (is_array($data) && isset($data['form']) && $data['form'] instanceof FormInterface) {
            return $data['form'];
        }

        return false;
    }
protected function getFormFromView ( View $ view ) { $ data = $ view -> getData ( ) ; if ( $ data instanceof FormInterface ) { return $ data ; } if ( is_array ( $ data ) && isset ( $ data [ 'form' ] ) && $ data [ 'form' ] instanceof FormInterface ) { return $ data [ 'form' ] ; } return false ; }
Returns the form from the given view if present, false otherwise.

@param View $view

@return bool|FormInterface
Returns the form from the given view if present false otherwise .