public function createSimpleEditForm(ContentNode $contentNode, Node $rootNode = null)
    {
        $contentNodeClassName = get_class($contentNode);

        $contentNodeParser = $this->get('mm_cmf_content.content_parser');

        $simpleFormData = $contentNodeParser->getSimpleForm($contentNodeClassName);
        //set FormType
        if (isset($simpleFormData['type']) && class_exists($simpleFormData['type'])) {
            $simpleFormType = $simpleFormData['type'];
        } else
            $simpleFormType = ContentNodeType::class;


        //get fields to hide
        $hiddenFields = $contentNodeParser->getHiddenFields($contentNodeClassName);

        $templateVars = array(
            'hiddenFields' => $hiddenFields,
            'action' => $this->get('router')->generate('mm_cmf_content_node_simple_update', array(
                'id' => $contentNode->getId()
            ))
        );

        if ($rootNode)
            $templateVars['root_node'] = $rootNode;

        return $this->createForm(
            $simpleFormType,
            $contentNode,
            $templateVars
        );
    }
public function createSimpleEditForm(ContentNode $contentNode, Node $rootNode = null)
    {
        $contentNodeClassName = get_class($contentNode);

        $contentNodeParser = $this->get('mm_cmf_content.content_parser');

        $simpleFormData = $contentNodeParser->getSimpleForm($contentNodeClassName);
        //set FormType
        if (isset($simpleFormData['type']) && class_exists($simpleFormData['type'])) {
            $simpleFormType = $simpleFormData['type'];
        } else
            $simpleFormType = ContentNodeType::class;


        //get fields to hide
        $hiddenFields = $contentNodeParser->getHiddenFields($contentNodeClassName);

        $templateVars = array(
            'hiddenFields' => $hiddenFields,
            'action' => $this->get('router')->generate('mm_cmf_content_node_simple_update', array(
                'id' => $contentNode->getId()
            ))
        );

        if ($rootNode)
            $templateVars['root_node'] = $rootNode;

        return $this->createForm(
            $simpleFormType,
            $contentNode,
            $templateVars
        );
    }
public function createSimpleEditForm ( ContentNode $ contentNode , Node $ rootNode = null ) { $ contentNodeClassName = get_class ( $ contentNode ) ; $ contentNodeParser = $ this -> get ( 'mm_cmf_content.content_parser' ) ; $ simpleFormData = $ contentNodeParser -> getSimpleForm ( $ contentNodeClassName ) ; //set FormType if ( isset ( $ simpleFormData [ 'type' ] ) && class_exists ( $ simpleFormData [ 'type' ] ) ) { $ simpleFormType = $ simpleFormData [ 'type' ] ; } else $ simpleFormType = ContentNodeType :: class ; //get fields to hide $ hiddenFields = $ contentNodeParser -> getHiddenFields ( $ contentNodeClassName ) ; $ templateVars = array ( 'hiddenFields' => $ hiddenFields , 'action' => $ this -> get ( 'router' ) -> generate ( 'mm_cmf_content_node_simple_update' , array ( 'id' => $ contentNode -> getId ( ) ) ) ) ; if ( $ rootNode ) $ templateVars [ 'root_node' ] = $ rootNode ; return $ this -> createForm ( $ simpleFormType , $ contentNode , $ templateVars ) ; }
Returns the configured Simple Form for Frontend Editing purpose

@param ContentNode $contentNode
@param Node|null $rootNode
@return \Symfony\Component\Form\Form
Returns the configured Simple Form for Frontend Editing purpose