当前位置: 首页>>代码示例>>PHP>>正文


PHP Module::__construct方法代码示例

本文整理汇总了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);
 }
开发者ID:achertovsky,项目名称:paypal-yii2,代码行数:8,代码来源:Module.php

示例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);
 }
开发者ID:INOVADADOS,项目名称:yii2-talma-zenvia,代码行数:14,代码来源:ZenviaModule.php

示例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';
 }
开发者ID:godardth,项目名称:yii2-webception,代码行数:17,代码来源:Module.php

示例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);
 }
开发者ID:slightlydiff,项目名称:yii2-simple-cms,代码行数:17,代码来源:MediaManager.php

示例5: __construct

 public function __construct($id, $parent, array $config = [])
 {
     $config = ArrayHelper::merge(['components' => ['storage' => ['class' => 'solarpatrol\\tle\\FileStorage']]], $config);
     parent::__construct($id, $parent, $config);
 }
开发者ID:solarpatrol,项目名称:yii2-tle,代码行数:5,代码来源:Module.php

示例6: __construct

 /**
  * @inheritdoc
  */
 public function __construct($id, $parent = null, $config = [])
 {
     $config = array_merge(['modules' => $this->modules()], $config);
     parent::__construct($id, $parent, $config);
 }
开发者ID:Junred,项目名称:yii2-wechat,代码行数:8,代码来源:Module.php

示例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);
 }
开发者ID:richardcj,项目名称:yii2-adm,代码行数:9,代码来源:Adm.php

示例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);
 }
开发者ID:pavlinter,项目名称:yii2-app-core,代码行数:9,代码来源:Module.php

示例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);
 }
开发者ID:pavlinter,项目名称:yii2-adm-pages,代码行数:9,代码来源:Module.php

示例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);
 }
开发者ID:pavlinter,项目名称:yii2-adm-mailing,代码行数:8,代码来源:Module.php

示例11:

 function __construct($id, $parent = null, $config = [])
 {
     parent::__construct($id, $parent = null, $config = []);
 }
开发者ID:yariksav,项目名称:yii2-actives,代码行数:4,代码来源:Module.php

示例12: __construct

 /**
  * Create a new Jaxon instance.
  *
  * @return void
  */
 public function __construct()
 {
     // Call the parent contructor after member initialisation
     parent::__construct('jaxon');
 }
开发者ID:jaxon-php,项目名称:jaxon-yii,代码行数:10,代码来源:Module.php


注:本文中的yii\base\Module::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。