コード例 #1
0
 public function __construct($config = [])
 {
     parent::__construct($config);
     if (!$this->transaction instanceof OrderTransaction) {
         $this->transaction = new OrderTransaction();
     }
 }
コード例 #2
0
ファイル: ImageX.php プロジェクト: kansey/yii2albom
 public function __construct($config = [])
 {
     //by default both opengraph and microdata are enabled, disable if ['enable' => false] was explicitly passed to widget
     $config['og'] = array_merge($this->og, isset($config['og']) ? $config['og'] : []);
     $config['md'] = array_merge($this->md, isset($config['md']) ? $config['md'] : []);
     parent::__construct($config);
 }
コード例 #3
0
ファイル: Widget.php プロジェクト: gromver/yii2-platform
 public function __construct($config = [])
 {
     $this->_config = $config;
     try {
         parent::__construct($config);
     } catch (WidgetMissedIdException $e) {
         throw $e;
     } catch (\Exception $e) {
         $this->processException($e);
     }
 }
コード例 #4
0
ファイル: ElementNav.php プロジェクト: giantbits/yii2-crelish
 public function __construct($config = [])
 {
     if (count($config) > 0) {
         $this->action = empty($config['action']) ? \Yii::$app->controller->action->id : $config['action'];
         $this->selector = empty($config['selector']) ? 'ctype' : $config['selector'];
         $this->ctype = empty($config[$this->selector]) ? '' : $config[$this->selector];
     } else {
         $this->action = \Yii::$app->controller->action->id;
         $this->ctype = !empty(\Yii::$app->getRequest()->getQueryParam($this->selector)) ? \Yii::$app->getRequest()->getQueryParam($this->selector) : 'page';
     }
     parent::__construct();
     // TODO: Change the autogenerated stub
 }
コード例 #5
0
ファイル: ConstructionWidget.php プロジェクト: iw-reload/iw
 public function __construct(BuildingFinderInterface $buildingFinder, $config = [])
 {
     $this->buildingFinder = $buildingFinder;
     parent::__construct($config);
 }
コード例 #6
0
ファイル: Sidebar.php プロジェクト: jarrus90/yii2-blog
 public function __construct(BlogFinder $finder, $config = [])
 {
     $this->finder = $finder;
     parent::__construct($config);
 }