public function load($template)
    {
        $path['manifest'] = $this->_buildManifestPath($template);

        if (file_exists($path['manifest'])) {

            $this->alias = $template;
            $this->thumbnail = AnRequest::root().'/templates/'.$template.'/thumbnail.png';

            $manifest = json_decode(file_get_contents($path['manifest']));

            foreach ($this->_attributes as $key => $value) {
                if (array_key_exists($key, $manifest)) {
                    $this->$key = $manifest->$key;
                }
            }

            $path['params'] = $this->_buildParamsPath($template);

            if (file_exists($path['params'])) {
                $this->params = parse_ini_file($path['params']);
            }

            return $this;
        }

        return false;
    }
public function load($template)
    {
        $path['manifest'] = $this->_buildManifestPath($template);

        if (file_exists($path['manifest'])) {

            $this->alias = $template;
            $this->thumbnail = AnRequest::root().'/templates/'.$template.'/thumbnail.png';

            $manifest = json_decode(file_get_contents($path['manifest']));

            foreach ($this->_attributes as $key => $value) {
                if (array_key_exists($key, $manifest)) {
                    $this->$key = $manifest->$key;
                }
            }

            $path['params'] = $this->_buildParamsPath($template);

            if (file_exists($path['params'])) {
                $this->params = parse_ini_file($path['params']);
            }

            return $this;
        }

        return false;
    }
public function load ( $ template ) { $ path [ 'manifest' ] = $ this -> _buildManifestPath ( $ template ) ; if ( file_exists ( $ path [ 'manifest' ] ) ) { $ this -> alias = $ template ; $ this -> thumbnail = AnRequest :: root ( ) . '/templates/' . $ template . '/thumbnail.png' ; $ manifest = json_decode ( file_get_contents ( $ path [ 'manifest' ] ) ) ; foreach ( $ this -> _attributes as $ key => $ value ) { if ( array_key_exists ( $ key , $ manifest ) ) { $ this -> $ key = $ manifest -> $ key ; } } $ path [ 'params' ] = $ this -> _buildParamsPath ( $ template ) ; if ( file_exists ( $ path [ 'params' ] ) ) { $ this -> params = parse_ini_file ( $ path [ 'params' ] ) ; } return $ this ; } return false ; }
Load the entity properties from template json file

@param string unique identifier

@return ComSettingsDomainEntitySetting entity object
Load the entity properties from template json file