作者:RexGalici
项目:yup
/**
* Формирует поле для редактирование параметра модуля
* @param \yupe\components\WebModule $module
* @param $param
* @return string
*/
private function getModuleParamRow(\yupe\components\WebModule $module, $param)
{
$editableParams = $module->getEditableParams();
$moduleParamsLabels = $module->getParamsLabels();
$res = CHtml::label($moduleParamsLabels[$param], $param);
/* если есть ключ в массиве параметров, то значит этот параметр выпадающий список в вариантами */
if (array_key_exists($param, $editableParams)) {
$res .= CHtml::dropDownList($param, $module->{$param}, $editableParams[$param], ['class' => 'form-control', 'empty' => Yii::t('YupeModule.yupe', '--choose--')]);
} else {
$res .= CHtml::textField($param, $module->{$param}, ['class' => 'form-control']);
}
return $res;
}
作者:RexGalici
项目:yup
public function getInstall()
{
if (parent::getInstall()) {
YFile::checkPath($this->updateTmpPath);
}
return false;
}
作者:alexanderku
项目:test-yii
public function beforeControllerAction($controller, $action)
{
if (parent::beforeControllerAction($controller, $action)) {
return true;
} else {
return false;
}
}
作者:alextravi
项目:yup
/**
*
*/
public function init()
{
parent::init();
$this->setImport(['callback.models.*']);
}
作者:kuzmina-mariy
项目:unizaro-ston
public function init()
{
parent::init();
$this->setImport(array('portfolio.models.*'));
}
作者:kuzmina-mariy
项目:unizaro-ston
public function init()
{
parent::init();
$this->setImport(array('application.modules.chemical.models.*', 'application.modules.dictionary.models.*'));
}
作者:alextravi
项目:yup
/**
*
*/
public function init()
{
$this->setImport(['notify.models.*']);
parent::init();
}
作者:RexGalici
项目:yup
public function init()
{
parent::init();
$this->setImport(['cart.extensions.shopping-cart.*', 'cart.widgets.ShoppingCartWidget', 'cart.models.*']);
}
作者:sepake
项目:yup
/**
* Инициализация модуля:
*
* @return nothing
**/
public function init()
{
parent::init();
}
作者:QSODeveloper
项目:yupe-storeswa
public function init()
{
$this->setImport(array('storeswap.models.*', 'storeswap.components.*'));
parent::init();
}
作者:kuzmina-mariy
项目:unizaro-ston
public function init()
{
$this->setImport(array('user.models.*', 'user.components.*'));
// Инициализируем роли и списки ролей
$guestRole = Yii::app()->user->guestName;
$this->rolesList = array();
foreach (Yii::app()->authManager->roles as $key => $role) {
if ($key != $guestRole) {
$this->rolesList[$key] = $role->description;
}
}
if (empty($this->rolesList)) {
$this->rolesList = array('admin' => Yii::t('UserModule.user', 'Administrator'), 'user' => Yii::t('UserModule.user', 'User'));
}
parent::init();
}
作者:kuzmina-mariy
项目:4season
/**
*
*/
public function init()
{
parent::init();
$this->setImport(['application.modules.realty.models.*', 'application.modules.eav.models.*', 'application.modules.eav.components.eavactiverecord.*', 'application.modules.eav.components.eavactiverecord.datatypes.*']);
}
作者:kuzmina-mariy
项目:4season
public function init()
{
$this->setImport(['user.models.*', 'user.events.*', 'user.listeners.*', 'user.components.*', 'yupe.YupeModule']);
parent::init();
}
作者:alextravi
项目:yup
/**
*
*/
public function init()
{
parent::init();
$this->setImport(['category.models.*', 'category.components.*']);
}
作者:RexGalici
项目:yup
public function init()
{
parent::init();
$this->setImport(['order.models.*', 'order.forms.*']);
}
作者:kuzmina-mariy
项目:happy-en
public function init()
{
parent::init();
$this->setImport(array('application.modules.classroom.models.*', 'application.modules.poll.models.*', 'application.modules.bazi.models.*'));
}
作者:alextravi
项目:yup
/**
*
*/
public function init()
{
parent::init();
$this->documentRoot = $_SERVER['DOCUMENT_ROOT'];
$forImport = [];
if (Yii::app()->hasModule('gallery')) {
$forImport[] = 'gallery.models.*';
}
$this->setImport(array_merge(['image.models.*'], $forImport));
}
作者:RexGalici
项目:yup
public function init()
{
$import = ['application.modules.comment.models.*'];
foreach (Yii::app()->getModules() as $module => $data) {
$import[] = "application.modules.{$module}.models.*";
}
$this->setImport($import);
if (!$this->email) {
$this->email = Yii::app()->getModule('yupe')->email;
}
$this->defaultCommentStatus = Comment::STATUS_NEED_CHECK;
parent::init();
}
作者:yup
项目:yup
/**
*
*/
public function init()
{
$this->setImport(['rbac.models.*', 'rbac.components.*']);
parent::init();
}
作者:alextravi
项目:yup
/**
*
*/
public function init()
{
parent::init();
$this->setImport(['feedback.models.*', 'feedback.components.*']);
if (!$this->emails) {
$this->emails = Yii::app()->getModule('yupe')->email;
}
}