Exemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return [TimestampBehavior::className(), BlameableBehavior::className(), TaggableBehavior::className(), ['class' => VersioningBehavior::className(), 'attributes' => ['title', 'alias', 'preview_text', 'detail_text', 'metakey', 'metadesc']], ['class' => UploadBehavior::className(), 'attributes' => ['detail_image' => ['fileName' => '{id}-full.#extension#'], 'preview_image' => ['fileName' => '{id}-thumb.#extension#', 'process' => ThumbnailProcessor::className()]], 'options' => ['basePath' => '@frontend/web', 'baseUrl' => '', 'savePath' => 'upload/posts']]];
 }
Exemplo n.º 2
0
 public function behaviors()
 {
     return [TimestampBehavior::className(), BlameableBehavior::className(), TaggableBehavior::className(), ['class' => VersioningBehavior::className(), 'attributes' => ['title', 'alias', 'preview_text', 'detail_text', 'metakey', 'metadesc']]];
 }