Public Member Functions |
| getClient () |
| getAssetsPath () |
| getViewFile ($viewName) |
| getJs ($path) |
| renderMail ($view, $title=null, $data) |
| redirect ($url, $terminate=true, $statusCode=302) |
Public Attributes |
| $layout = '//layouts/gportal' |
| $mailLayout = '//layouts/mail' |
Protected Member Functions |
| beforeAction ($action) |
Detailed Description
Gentics Portal.Node PHP Author & Copyright (c) by Gentics Software GmbH sales.nosp@m.@gen.nosp@m.tics..nosp@m.com http://www.gentics.com Licenses can be found in the LICENSE.txt file in the root-folder of this installation You must not use this software without a valid license agreement.
Base controller for all controllers in application
Definition at line 12 of file BaseController.php.
Member Function Documentation
BaseController::getAssetsPath |
( |
| ) |
|
CAssetManager is a Web application component that manages private files (called assets) and makes them accessible by Web clients. It achieves this goal by copying assets to a Web-accessible directory and returns the corresponding URL for accessing them.
- Exceptions
-
- Returns
- string the root directory storing the published asset files. Defaults to 'WebRoot/assets'.
Definition at line 49 of file BaseController.php.
{
if (is_null($this->_assetsPath)) {
$assetsPath = ($this->module !== null) ? $this->module->name . '/assets' : Yii::app()->controller->client->contentPath;
if (($assetsPath = realpath($assetsPath)) === false || !is_dir($assetsPath) || !is_writable($assetsPath)) {
throw new CException(
Yii::t('yii', 'CAssetManager.basePath "{path}" is invalid. Please make sure the directory exists and is writable by the Web server process.', array('{path}' => $assetsPath))
);
}
$this->_assetsPath = Yii::app()->assetManager->publish($assetsPath, false, -1, false);
}
return $this->_assetsPath;
}
BaseController::getClient |
( |
| ) |
|
Temporary dummy method
- Returns
- object with configuration info
Definition at line 29 of file BaseController.php.
{
$this->_clientParams = new stdClass;
$this->_clientParams->username = Yii::app()->params['client']['username'];
$this->_clientParams->contentPath = Yii::app()->params['storageFolder'] . DIRECTORY_SEPARATOR . $this->_clientParams->username;
return $this->_clientParams;
}
BaseController::getViewFile |
( |
|
$viewName | ) |
|
Overridden parent method. Add possibility to load view files from /custom folder
- Parameters
-
string | $viewName | name of view |
- Returns
- bool|string
Definition at line 70 of file BaseController.php.
{
if (isset(Yii::app()->params['customViews']) && Yii::app()->params['customViews'] == true) {
$customSection = realpath(Yii::getPathOfAlias('site.custom'));
$commonSection = realpath(Yii::getPathOfAlias('site.common'));
$frontendSection = realpath(Yii::getPathOfAlias('site.frontend'));
$customView = str_replace(array($commonSection, $frontendSection), $customSection, $viewFile);
if (file_exists($customView)) {
return $customView;
}
}
return $viewFile;
}
The documentation for this class was generated from the following file: