Esempio n. 1
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['uploadBehavior' => ['class' => UploadBehavior::className(), 'attributes' => ['avatar_url' => ['path' => $this->module->avatarPath, 'tempPath' => $this->module->avatarsTempPath, 'url' => $this->module->avatarUrl]]]];
 }
Esempio n. 2
0
 public function behaviors()
 {
     return ['uploadBehavior' => ['class' => UploadBehavior::className(), 'attributes' => ['image_file' => ['path' => \Yii::$app->getModule($this->moduleId)->imageDir . '/', 'tempPath' => \Yii::$app->getModule($this->moduleId)->imageDir . '/temp', 'url' => \Yii::$app->getModule($this->moduleId)->imageUrl . '/']]], 'metatag' => ['class' => MetatagBehavior::className()]];
 }
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['uploadBehavior' => ['class' => UploadBehavior::className(), 'attributes' => ['avatar_url' => ['path' => self::AVATAR_UPLOAD_PATH, 'tempPath' => self::AVATAR_UPLOAD_TEMP_PATH, 'url' => self::AVATAR_URL]]]];
 }
Esempio n. 4
0
 public function behaviors()
 {
     return ['uploadBehavior' => ['class' => UploadBehavior::className(), 'attributes' => ['avatar' => ['path' => '@app/public_html/upload/images/avatar', 'tempPath' => '@app/public_html/upload/tmp']]]];
 }
Esempio n. 5
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['timestampBehavior' => ['class' => TimestampBehavior::className()], 'sluggableBehavior' => ['class' => SluggableBehavior::className(), 'attribute' => 'title', 'slugAttribute' => 'alias'], 'uploadBehavior' => ['class' => UploadBehavior::className(), 'attributes' => ['preview_url' => ['path' => $this->module->previewPath, 'tempPath' => $this->module->imagesTempPath, 'url' => $this->module->previewUrl], 'image_url' => ['path' => $this->module->imagePath, 'tempPath' => $this->module->imagesTempPath, 'url' => $this->module->imageUrl]]], 'purifierBehavior' => ['class' => PurifierBehavior::className(), 'attributes' => [self::EVENT_BEFORE_VALIDATE => ['snippet', 'content' => ['HTML.AllowedElements' => '', 'AutoFormat.RemoveEmpty' => true]]], 'textAttributes' => [self::EVENT_BEFORE_VALIDATE => ['title', 'alias']]]];
 }
Esempio n. 6
0
 public function behaviors()
 {
     return ['uploadBehavior' => ['class' => UploadBehavior::className(), 'attributes' => ['file_schema' => ['path' => "@frontend/web/uploads/file_schema", 'tempPath' => '@frontend/web/uploads/tmp', 'url' => '/part/file_schema/view'], 'file_foto' => ['path' => "@frontend/web/uploads/file_foto", 'tempPath' => '@frontend/web/uploads/tmp', 'url' => '/part/file_schema/view']]]];
 }
Esempio n. 7
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['uploadBehavior' => ['class' => UploadBehavior::className(), 'attributes' => ['avatar_path' => ['path' => '@storage/avatars', 'tempPath' => '@storage/tmp', 'url' => Yii::getAlias('@storageUrl/avatars')]]]];
 }
 public function behaviors()
 {
     return ['sluggableBehavior' => ['class' => SluggableBehavior::className(), 'attribute' => 'title', 'slugAttribute' => 'title_en'], 'uploadBehavior' => ['class' => UploadBehavior::className(), 'attributes' => ['image_id' => ['path' => $this->module->imagePath . '/cafedra', 'tempPath' => $this->module->imagesTempPath . '/cafedra', 'url' => $this->module->imageUrl . '/cafedra']]], 'purifierBehavior' => ['class' => PurifierBehavior::className(), 'attributes' => [self::EVENT_BEFORE_VALIDATE => ['description']], 'textAttributes' => [self::EVENT_BEFORE_VALIDATE => ['title', 'title_en']]]];
 }
Esempio n. 9
0
 public function behaviors()
 {
     return ['uploadBehavior' => ['class' => UploadBehavior::className(), 'attributes' => ['picUrl' => ['tempPath' => '@runtime/tmp', 'path' => '@app/web' . DIRECTORY_SEPARATOR . self::WX_ACTION_RESP_IMAGE_PATH, 'url' => Yii::$app->request->getHostInfo() . Yii::$app->request->getBaseUrl() . '/' . self::WX_ACTION_RESP_IMAGE_PATH]]]];
 }
Esempio n. 10
0
 /**
  * create_time, update_time to now()
  * crate_user_id, update_user_id to current login user id
  */
 public function behaviors()
 {
     return ['uploadBehavior' => ['class' => UploadBehavior::className(), 'attributes' => ['avatar_url' => ['path' => '@frontend/web/assets', 'tempPath' => '@frontend/web/assets', 'url' => '/yii2-funson86/frontend/web/assets']]]];
 }
Esempio n. 11
0
 public function behaviors()
 {
     return ['uploadBehavior' => ['class' => UploadBehavior::className(), 'attributes' => ['image' => ['path' => \Yii::$app->params['imagePath'], 'tempPath' => \Yii::$app->params['imagePath'], 'url' => Yii::getAlias(\Yii::$app->params['imageUrl'])]]]];
 }
Esempio n. 12
0
 public function behaviors()
 {
     return ['uploadBehavior' => ['class' => UploadBehavior::className(), 'attributes' => ['file' => ['path' => Yii::getAlias('@webroot') . '/images/', 'tempPath' => Yii::getAlias('@webroot') . '/images/tmp/', 'url' => '/images/']]]];
 }