예제 #1
0
파일: Column.php 프로젝트: jorry2008/turen
 /**
  * 一对多
  */
 public function getPost()
 {
     return $this->hasMany(Post::className(), ['column_id' => 'id']);
 }
예제 #2
0
 /**
  * @inheritdoc
  */
 public function actions()
 {
     return ['file-upload' => ['class' => 'backend\\components\\FileUploadAction'], 'ueditor' => ['class' => \backend\components\ueditor\UeditorAction::className()], 'switch-status' => ['class' => \backend\components\SwitchAction::className(), 'className' => Post::className(), 'id' => Yii::$app->getRequest()->get('id'), 'feild' => 'status'], 'delete' => ['class' => \backend\components\SwitchAction::className(), 'className' => Post::className(), 'id' => Yii::$app->getRequest()->get('id'), 'feild' => 'deleted', 'value' => 1]];
 }