* @license PHP License * @package WB * @subpackage content */ /** * Load base class */ WBClass::load( 'WBContent' ); /** * Content component: Static * * @version 0.1.1 * @package WB * @subpackage content */ class WBContent_Static extends WBContent { /** * my parameter list * @var array */ protected $config = array( 'tmpl' => 'blank', 'string' => '', 'requiredgroup' => parent::GROUP_ANON, 'deniedtmpl' => 'accessDenied', ); /** * static string * @var string */ protected $string = ''; /** * run * * run component * * @return array parameter list */ public function run() { if (!empty($this->config['string'])) { $this->string = $this->config['string']; return $this->config; } $tmpl = $this->config['tmpl']; if (!$this->isUserInGroup($this->config['requiredgroup'])) { $tmpl = $this->config['deniedtmpl']; } $this->loadTemplates($tmpl); $this->tmpl->addGlobalVars($this->config); $this->string = $this->tmpl->getParsedTemplate(); return $this->config; } /** * receive output * * fetch output of this content component * * @return string */ public function getString() { return $this->string; } } ?>