/** * @inheritdoc */ public function init() { Widget::registerTranslations(); if ($this->url === null) { throw new InvalidConfigException(Yii::t('cropper', 'MISSING_ATTRIBUTE', ['attribute' => 'url'])); } else { $this->url = rtrim($this->url, '/') . '/'; } if ($this->path === null) { throw new InvalidConfigException(Yii::t('cropper', 'MISSING_ATTRIBUTE', ['attribute' => 'path'])); } else { $this->path = rtrim(Yii::getAlias($this->path), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; } }