Exemplo n.º 1
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' => Download::className(), 'id' => Yii::$app->getRequest()->get('id'), 'feild' => 'status'], 'delete' => ['class' => \backend\components\SwitchAction::className(), 'className' => Download::className(), 'id' => Yii::$app->getRequest()->get('id'), 'feild' => 'deleted', 'value' => 1]];
 }
Exemplo n.º 2
0
 /**
  * 一对多
  */
 public function getDownload()
 {
     return $this->hasMany(Download::className(), ['column_id' => 'id']);
 }