Location: PHPKode > projects > Blackwolf CMF > projectBlackWolf/lib/Template/TokenParser/Model.class.php
<?php
/* Please see the README and LICENSE files. */


/**
 * This parses a token that references a data model
 */
class Template_TokenParser_Model implements Template_TokenParser {
    /**
     * @see Template_TokenParser
     */
    public function parse($type,$params, $vars = NULL, $model = NULL) {
        if(count($type)==2){
            return Permission_Subsystem::can_read_attribute($model->$type[1]) ? 
                    $model->$type[1]->value : 
                    "[Attribute Hidden]";
        }
    }
}

?>
Return current item: Blackwolf CMF