public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
    {
        $ret = array();
        $ret['placeholder'] = $this->_getPlaceholder();
        $ret['rootElementClass'] = self::getRootElementClass($this);
        $ret['bemClass'] = $this->_getBemClass('');

        $ret['data'] = $this->getData();
        $ret['row'] = $this->_getRow();

        $supportedContexts = Kwf_Component_Layout_Abstract::getInstance($this->getData()->componentClass)->getSupportedContexts();
        if ($supportedContexts) {
            $contexts = Kwf_Component_Layout_Abstract::getInstance($this->getData()->componentClass)->getContexts($this->getData());
            if (is_null($contexts)) {
                $e = new Kwf_Exception("Didn't get layout contexts for ".$this->getData()->componentId);
                $e->logOrThrow();
            }
            foreach ($contexts as $ctx) {
                if (!in_array($ctx, $supportedContexts)) {
                    $e = new Kwf_Exception("Master Layout Context ".json_encode($ctx)." is not supported by ".$this->getData()->componentClass." for '".$this->getData()->componentId."'");
                    $e->logOrThrow();
                }
            }
        }
        return $ret;
    }
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
    {
        $ret = array();
        $ret['placeholder'] = $this->_getPlaceholder();
        $ret['rootElementClass'] = self::getRootElementClass($this);
        $ret['bemClass'] = $this->_getBemClass('');

        $ret['data'] = $this->getData();
        $ret['row'] = $this->_getRow();

        $supportedContexts = Kwf_Component_Layout_Abstract::getInstance($this->getData()->componentClass)->getSupportedContexts();
        if ($supportedContexts) {
            $contexts = Kwf_Component_Layout_Abstract::getInstance($this->getData()->componentClass)->getContexts($this->getData());
            if (is_null($contexts)) {
                $e = new Kwf_Exception("Didn't get layout contexts for ".$this->getData()->componentId);
                $e->logOrThrow();
            }
            foreach ($contexts as $ctx) {
                if (!in_array($ctx, $supportedContexts)) {
                    $e = new Kwf_Exception("Master Layout Context ".json_encode($ctx)." is not supported by ".$this->getData()->componentClass." for '".$this->getData()->componentId."'");
                    $e->logOrThrow();
                }
            }
        }
        return $ret;
    }
public function getTemplateVars ( Kwf_Component_Renderer_Abstract $ renderer ) { $ ret = array ( ) ; $ ret [ 'placeholder' ] = $ this -> _getPlaceholder ( ) ; $ ret [ 'rootElementClass' ] = self :: getRootElementClass ( $ this ) ; $ ret [ 'bemClass' ] = $ this -> _getBemClass ( '' ) ; $ ret [ 'data' ] = $ this -> getData ( ) ; $ ret [ 'row' ] = $ this -> _getRow ( ) ; $ supportedContexts = Kwf_Component_Layout_Abstract :: getInstance ( $ this -> getData ( ) -> componentClass ) -> getSupportedContexts ( ) ; if ( $ supportedContexts ) { $ contexts = Kwf_Component_Layout_Abstract :: getInstance ( $ this -> getData ( ) -> componentClass ) -> getContexts ( $ this -> getData ( ) ) ; if ( is_null ( $ contexts ) ) { $ e = new Kwf_Exception ( "Didn't get layout contexts for " . $ this -> getData ( ) -> componentId ) ; $ e -> logOrThrow ( ) ; } foreach ( $ contexts as $ ctx ) { if ( ! in_array ( $ ctx , $ supportedContexts ) ) { $ e = new Kwf_Exception ( "Master Layout Context " . json_encode ( $ ctx ) . " is not supported by " . $ this -> getData ( ) -> componentClass . " for '" . $ this -> getData ( ) -> componentId . "'" ) ; $ e -> logOrThrow ( ) ; } } } return $ ret ; }
Returns variables that can be used in Component.tpl
@param e.g. for accessing recipient in Mail_Renderer
@return array
Returns variables that can be used in Component . tpl