Esempio n. 1
0
 public function behaviors()
 {
     return ['uploadImageBehavior' => ['class' => UploadImageBehavior::className(), 'attributes' => ['image' => ['path' => $this->module->CategoryImagePath, 'temp_path' => $this->module->CategoryImageTempPath, 'url' => $this->module->CategoryImagePathPreview, 'key_folder' => 'id']]]];
 }
Esempio n. 2
0
 public function behaviors()
 {
     return ['timestampBehavior' => ['class' => TimestampBehavior::className(), 'attributes' => [ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'], ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']], 'value' => function () {
         return date('U');
     }], 'uploadImageBehavior' => ['class' => UploadImageBehavior::className(), 'attributes' => ['intro_image' => ['path' => $this->module->ImagePath, 'temp_path' => $this->module->ImageTempPath, 'url' => $this->module->ImagePathPreview, 'key_folder' => 'id'], 'full_image' => ['path' => $this->module->ImagePath, 'temp_path' => $this->module->ImageTempPath, 'url' => $this->module->ImagePathPreview, 'key_folder' => 'id']]], 'uploadFileBehavior' => ['class' => MultipleUploadBehavior::className(), 'attributes' => ['attachments' => ['path' => $this->module->ImagePath, 'temp_path' => $this->module->ImageTempPath, 'url' => $this->module->ImagePathPreview, 'key_folder' => 'id'], 'gallery' => ['path' => $this->module->ImagePath, 'temp_path' => $this->module->ImageTempPath, 'url' => $this->module->ImagePathPreview, 'key_folder' => 'id', 'galleryType' => true]]], 'slagBehavior' => ['class' => SluggableBehavior::className(), 'attribute' => 'description', 'slugAttribute' => 'slug', 'ensureUnique' => true]];
 }
Esempio n. 3
0
 public function behaviors()
 {
     return [TimestampBehavior::className(), 'uploadImageBehavior' => ['class' => UploadImageBehavior::className(), 'attributes' => ['profile_image' => ['path' => $this->module->ProfileImagePath, 'temp_path' => $this->module->ProfileImageTempPath, 'url' => $this->module->ProfileImagePathPreview]]]];
 }
Esempio n. 4
0
 public function behaviors()
 {
     return ['timestampBehavior' => ['class' => TimestampBehavior::className(), 'attributes' => [ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'], ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']], 'value' => function () {
         return date('U');
     }], 'uploadImageBehavior' => ['class' => UploadImageBehavior::className(), 'attributes' => ['cover_page' => ['path' => $this->module->ComicsPath, 'temp_path' => $this->module->ComicsTempPath, 'url' => $this->module->ComicsPathPreview, 'key_folder' => 'id']]], 'uploadFileBehavior' => ['class' => MultipleUploadBehavior::className(), 'attributes' => ['comic_pages' => ['path' => $this->module->ComicsPath, 'temp_path' => $this->module->ComicsTempPath, 'url' => $this->module->ComicsPathPreview, 'key_folder' => 'id', 'galleryType' => true]]]];
 }