yii\base\Module::__construct PHP Method

__construct() public method

Constructor.
public __construct ( string $id, Module $parent = null, array $config = [] )
$id string the ID of this module.
$parent Module the parent module (if any).
$config array name-value pairs that will be used to initialize the object properties.
    public function __construct($id, $parent = null, $config = [])
    {
        $this->id = $id;
        $this->module = $parent;
        parent::__construct($config);
    }

Usage Example

Example #1
0
 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);
 }
All Usage Examples Of yii\base\Module::__construct