protected function hideSubmitButtonIfNotUsed()
    {
        $submit = $this->getComponent(static::SUBMIT_BUTTON_ID);
        if (!$submit) {
            return;
        }
        /**
         * @see \ViewComponents\ViewComponents\Base\Control\ControlInterface::isManualFormSubmitRequired
         */
        if (!$this
            ->getChildrenRecursive()
            ->filterByProperty('manual_form_submit_required', true, true)
            ->isEmpty()
        ) {
            return;
        }
        // @todo use correct way hide/detach component
        $submit->parent()->setView(null);
    }
protected function hideSubmitButtonIfNotUsed()
    {
        $submit = $this->getComponent(static::SUBMIT_BUTTON_ID);
        if (!$submit) {
            return;
        }
        /**
         * @see \ViewComponents\ViewComponents\Base\Control\ControlInterface::isManualFormSubmitRequired
         */
        if (!$this
            ->getChildrenRecursive()
            ->filterByProperty('manual_form_submit_required', true, true)
            ->isEmpty()
        ) {
            return;
        }
        // @todo use correct way hide/detach component
        $submit->parent()->setView(null);
    }
protected function hideSubmitButtonIfNotUsed ( ) { $ submit = $ this -> getComponent ( static :: SUBMIT_BUTTON_ID ) ; if ( ! $ submit ) { return ; } /**
         * @see \ViewComponents\ViewComponents\Base\Control\ControlInterface::isManualFormSubmitRequired
         */ if ( ! $ this -> getChildrenRecursive ( ) -> filterByProperty ( 'manual_form_submit_required' , true , true ) -> isEmpty ( ) ) { return ; } // @todo use correct way hide/detach component $ submit -> parent ( ) -> setView ( null ) ; }
Hides 'submit_button' component if it's not required by another components.
Hides submit_button component if it s not required by another components .