public function getMasterTemplateVars(Kwf_Component_Data $innerComponent, Kwf_Component_Renderer_Abstract $renderer)
    {
        $ret = array();
        $ret['component'] = $innerComponent;
        $ret['data'] = $innerComponent;
        $ret['template'] = self::getMasterTemplateFile($this->getData()->componentClass);
        $ret['pageLanguage'] = $innerComponent->getLanguage();
        $ret['boxes'] = array();
        foreach ($innerComponent->getPageOrRoot()->getChildBoxes() as $box) {
            $ret['boxes'][$box->box] = $box;
        }

        $ret['multiBoxes'] = array();
        foreach ($innerComponent->getPageOrRoot()->getRecursiveChildComponents(array('multiBox'=>true)) as $box) {
            $ret['multiBoxes'][$box->box][] = $box;
        }
        //sort by priority
        foreach ($ret['multiBoxes'] as $box=>$components) {
            usort($ret['multiBoxes'][$box], array('Kwf_Component_View_Helper_ComponentWithMaster', '_sortByPriority'));
        }


        $up = Kwf_Config::getValue('application.uniquePrefix');
        if (!$up) {
            $ret['bemClass'] = '';
        } else {
            $ret['bemClass'] = Kwf_Component_Abstract::formatRootElementClass($this->getData()->componentClass, '').'Master__';
        }

        $ret['rootElementClass'] = 'kwfUp-frontend '.Kwf_Component_Abstract::formatRootElementClass($this->getData()->componentClass, '').'Master';

        return $ret;
    }
public function getMasterTemplateVars(Kwf_Component_Data $innerComponent, Kwf_Component_Renderer_Abstract $renderer)
    {
        $ret = array();
        $ret['component'] = $innerComponent;
        $ret['data'] = $innerComponent;
        $ret['template'] = self::getMasterTemplateFile($this->getData()->componentClass);
        $ret['pageLanguage'] = $innerComponent->getLanguage();
        $ret['boxes'] = array();
        foreach ($innerComponent->getPageOrRoot()->getChildBoxes() as $box) {
            $ret['boxes'][$box->box] = $box;
        }

        $ret['multiBoxes'] = array();
        foreach ($innerComponent->getPageOrRoot()->getRecursiveChildComponents(array('multiBox'=>true)) as $box) {
            $ret['multiBoxes'][$box->box][] = $box;
        }
        //sort by priority
        foreach ($ret['multiBoxes'] as $box=>$components) {
            usort($ret['multiBoxes'][$box], array('Kwf_Component_View_Helper_ComponentWithMaster', '_sortByPriority'));
        }


        $up = Kwf_Config::getValue('application.uniquePrefix');
        if (!$up) {
            $ret['bemClass'] = '';
        } else {
            $ret['bemClass'] = Kwf_Component_Abstract::formatRootElementClass($this->getData()->componentClass, '').'Master__';
        }

        $ret['rootElementClass'] = 'kwfUp-frontend '.Kwf_Component_Abstract::formatRootElementClass($this->getData()->componentClass, '').'Master';

        return $ret;
    }
public function getMasterTemplateVars ( Kwf_Component_Data $ innerComponent , Kwf_Component_Renderer_Abstract $ renderer ) { $ ret = array ( ) ; $ ret [ 'component' ] = $ innerComponent ; $ ret [ 'data' ] = $ innerComponent ; $ ret [ 'template' ] = self :: getMasterTemplateFile ( $ this -> getData ( ) -> componentClass ) ; $ ret [ 'pageLanguage' ] = $ innerComponent -> getLanguage ( ) ; $ ret [ 'boxes' ] = array ( ) ; foreach ( $ innerComponent -> getPageOrRoot ( ) -> getChildBoxes ( ) as $ box ) { $ ret [ 'boxes' ] [ $ box -> box ] = $ box ; } $ ret [ 'multiBoxes' ] = array ( ) ; foreach ( $ innerComponent -> getPageOrRoot ( ) -> getRecursiveChildComponents ( array ( 'multiBox' => true ) ) as $ box ) { $ ret [ 'multiBoxes' ] [ $ box -> box ] [ ] = $ box ; } //sort by priority foreach ( $ ret [ 'multiBoxes' ] as $ box => $ components ) { usort ( $ ret [ 'multiBoxes' ] [ $ box ] , array ( 'Kwf_Component_View_Helper_ComponentWithMaster' , '_sortByPriority' ) ) ; } $ up = Kwf_Config :: getValue ( 'application.uniquePrefix' ) ; if ( ! $ up ) { $ ret [ 'bemClass' ] = '' ; } else { $ ret [ 'bemClass' ] = Kwf_Component_Abstract :: formatRootElementClass ( $ this -> getData ( ) -> componentClass , '' ) . 'Master__' ; } $ ret [ 'rootElementClass' ] = 'kwfUp-frontend ' . Kwf_Component_Abstract :: formatRootElementClass ( $ this -> getData ( ) -> componentClass , '' ) . 'Master' ; return $ ret ; }
Returns variables that can be used in Master.tpl
@param e.g. for accessing recipient in Mail_Renderer
@return array
Returns variables that can be used in Master . tpl