yii\captcha\Captcha::init PHP Метод

init() публичный Метод

Initializes the widget.
public init ( )
    public function init()
    {
        parent::init();
        static::checkRequirements();
        if (!isset($this->imageOptions['id'])) {
            $this->imageOptions['id'] = $this->options['id'] . '-image';
        }
    }

Usage Example

Пример #1
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     if ($this->model === null) {
         throw new InvalidConfigException('This functionality works only with inputs created from models');
     }
     $this->captchaAction = Yii::getAlias('@captchaRoute');
     parent::init();
 }
All Usage Examples Of yii\captcha\Captcha::init