Пример #1
0
 /**
  * link parameter to access deleted model
  *
  * @return array
  */
 static function paramsDeleted()
 {
     return ['url' => [static::actionRoute('deleted'), 'ru' => ReturnUrl::getToken()], 'label' => 'Deleted', 'icon' => Icon::create('trash'), 'buttonOptions' => ['class' => 'btn btn-default']];
 }
Пример #2
0
 /**
  * return 'create' link parameter
  *
  * @return array
  */
 static function paramsCreate()
 {
     return ['url' => [static::actionRoute('create'), 'ru' => ReturnUrl::getToken()], 'label' => 'Create', 'icon' => Icon::create('plus'), 'buttonOptions' => ['class' => 'btn btn-primary']];
 }
 /**
  * link parameter to restore deleted model
  *
  * @return array
  */
 public function getParamsRestore()
 {
     $primaryKey = $this->model->primaryKey()[0];
     return ['url' => [$this->actionRoute('restore'), $primaryKey => $this->model->getAttribute($primaryKey), 'ru' => ReturnUrl::getToken()], 'label' => 'Restore', 'icon' => Icon::create('pencil'), 'buttonOptions' => ['class' => 'btn btn-primary']];
 }
Пример #4
0
 /**
  * return 'delete' link parameter
  *
  * @return array
  */
 public function getParamsDelete()
 {
     $primaryKey = $this->model->primaryKey()[0];
     return ['url' => [$this->actionRoute('delete'), $primaryKey => $this->model->getAttribute($primaryKey), 'ru' => ReturnUrl::getToken()], 'label' => 'Delete', 'icon' => Icon::create('trash'), 'linkOptions' => ['data-confirm' => 'Are you sure to delete this item?', 'data-method' => 'post', 'class' => 'text text-danger'], 'buttonOptions' => ['class' => 'btn btn-danger']];
 }