77 public $layout =
'rights.views.layouts.main';
99 $this->setImport(array(
100 'rights.components.*',
101 'rights.components.behaviors.*',
102 'rights.components.dataproviders.*',
103 'rights.controllers.*',
108 $this->setComponents(array(
109 'authorizer' => array(
110 'class' =>
'RAuthorizer',
111 'superuserName' => $this->superuserName,
113 'generator' => array(
114 'class' =>
'RGenerator',
119 $this->defaultController =
'assignment';
122 if ($this->install ===
true) {
123 $this->setComponents(array(
124 'installer' => array(
125 'class' =>
'RInstaller',
126 'superuserName' => $this->superuserName,
127 'authenticatedName' => $this->authenticatedName,
128 'guestName' => Yii::app()->user->guestName,
129 'defaultRoles' => Yii::app()->authManager->defaultRoles,
134 $this->defaultController =
'install';
147 $cs = Yii::app()->getClientScript();
148 $cs->registerCoreScript(
'jquery');
149 $cs->registerCoreScript(
'jquery.ui');
150 $cs->registerScriptFile($assetsUrl.
'/js/rights.js');
151 $cs->registerCssFile($assetsUrl.
'/css/core.css');
154 if ($this->cssFile !==
false) {
156 if ($this->cssFile === null) {
157 $this->cssFile = $assetsUrl.
'/css/default.css';
159 $this->cssFile = Yii::app()->request->baseUrl.$this->cssFile;
163 $cs->registerCssFile($this->cssFile);
174 if ($this->_assetsUrl === null) {
175 $assetsPath = Yii::getPathOfAlias(
'rights.assets');
178 if ($this->debug ===
true) {
179 $this->_assetsUrl = Yii::app()->getAssetManager()->publish($assetsPath,
false, -1,
true);
181 $this->_assetsUrl = Yii::app()->getAssetManager()->publish($assetsPath);
193 return $this->getComponent(
'authorizer');
201 return $this->getComponent(
'installer');
209 return $this->getComponent(
'generator');