本文整理汇总了PHP中yii\base\Module::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Module::__construct方法的具体用法?PHP Module::__construct怎么用?PHP Module::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\base\Module
的用法示例。
在下文中一共展示了Module::__construct方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($id, $parent = null, $config = array())
{
parent::__construct($id, $parent, $config);
$this->ipnUrl = Yii::$app->urlManager->createAbsoluteUrl($this->ipnUrl);
$this->expressSuccessUrl = Yii::$app->urlManager->createAbsoluteUrl($this->expressSuccessUrl);
$this->subscriptionExpressSuccessUrl = Yii::$app->urlManager->createAbsoluteUrl($this->subscriptionExpressSuccessUrl);
$this->cancelUrl = Yii::$app->urlManager->createAbsoluteUrl($this->cancelUrl);
}
示例2: __construct
/**
* @inheritdoc
*/
public function __construct($id, $parent = null, $config = [])
{
foreach ($this->getModuleComponents() as $name => $component) {
if (!isset($config['components'][$name])) {
$config['components'][$name] = $component;
} elseif (is_array($config['components'][$name]) && !isset($config['components'][$name]['class'])) {
$config['components'][$name]['class'] = $component['class'];
}
}
parent::__construct($id, $parent, $config);
}
示例3: __construct
/**
* Constructor.
* @param string $id the ID of this module
* @param Module $parent the parent module (if any)
* @param array $config name-value pairs that will be used to initialize the object properties
*/
public function __construct($id, $parent = null, $config = [])
{
parent::__construct($id, $parent, $config);
$this->db_name = 'fullplanner_test_webception';
$this->db_username = 'fullplanner';
$this->db_password = 'NbDC96SH3JvTHMpE';
// Open the database connection for the module
$this->db = new \yii\db\Connection(['dsn' => 'mysql:dbname=' . $this->db_name . ';host=localhost', 'username' => $this->db_username, 'password' => $this->db_password]);
$this->db->open();
$this->layout = 'main';
}
示例4: __construct
/**
* @inheritdoc
*/
public function __construct($id, $parent = null, $config = [])
{
foreach ($this->getModuleComponents() as $name => $component) {
if (!isset($config['components'][$name])) {
$config['components'][$name] = $component;
} elseif (is_array($config['components'][$name]) && !isset($config['components'][$name]['class'])) {
$config['components'][$name]['class'] = $component['class'];
}
}
if (empty($this->mediarepositoryPath)) {
$this->mediarepositoryPath = Yii::getAlias('@webroot') . DIRECTORY_SEPARATOR . 'mediarepository';
}
parent::__construct($id, $parent, $config);
}
示例5: __construct
public function __construct($id, $parent, array $config = [])
{
$config = ArrayHelper::merge(['components' => ['storage' => ['class' => 'solarpatrol\\tle\\FileStorage']]], $config);
parent::__construct($id, $parent, $config);
}
示例6: __construct
/**
* @inheritdoc
*/
public function __construct($id, $parent = null, $config = [])
{
$config = array_merge(['modules' => $this->modules()], $config);
parent::__construct($id, $parent, $config);
}
示例7: __construct
/**
* @inheritdoc
*/
public function __construct($id, $parent = null, $config = [])
{
$this->registerTranslations();
$config = ArrayHelper::merge(['aliases' => ['@admRoot' => '@vendor/pavlinter/yii2-adm/adm'], 'controllerMap' => ['elfinder' => true], 'components' => ['manager' => ['class' => 'pavlinter\\adm\\ModelManager'], 'user' => Yii::$app->getUser()]], $config);
parent::__construct($id, $parent, $config);
}
示例8: __construct
/**
* @inheritdoc
*/
public function __construct($id, $parent = null, $config = [])
{
$this->registerTranslations();
$config = ArrayHelper::merge(['components' => ['manager' => ['class' => 'app\\modules\\admhidemenu\\ModelManager']]], $config);
parent::__construct($id, $parent, $config);
}
示例9: __construct
/**
* @inheritdoc
*/
public function __construct($id, $parent = null, $config = [])
{
$this->registerTranslations();
$config = ArrayHelper::merge(['files' => ['page' => ['dirs' => ['@webroot/files/pages/{id}/gallery'], 'startPath' => 'pages::{id}', 'maxWidth' => 1500, 'maxHeight' => 1500, 'watermark' => 0], 'main' => ['dirs' => ['@webroot/files/pages/{id}/gallery'], 'startPath' => 'pages::{id}', 'maxWidth' => 1500, 'maxHeight' => 1500, 'watermark' => 0]], 'components' => ['manager' => ['class' => 'pavlinter\\admpages\\ModelManager']]], $config);
parent::__construct($id, $parent, $config);
}
示例10: __construct
/**
* @inheritdoc
*/
public function __construct($id, $parent = null, $config = [])
{
$config = ArrayHelper::merge(['components' => ['manager' => ['class' => 'pavlinter\\admmailing\\ModelManager']]], $config);
parent::__construct($id, $parent, $config);
}
示例11:
function __construct($id, $parent = null, $config = [])
{
parent::__construct($id, $parent = null, $config = []);
}
示例12: __construct
/**
* Create a new Jaxon instance.
*
* @return void
*/
public function __construct()
{
// Call the parent contructor after member initialisation
parent::__construct('jaxon');
}