controllers/ContentTypeController.php 1 location
|
@@ 62-70 (lines=9) @@
|
59 |
|
* |
60 |
|
* @return \yii\web\Response |
61 |
|
*/ |
62 |
|
public function actionToggle($id) |
63 |
|
{ |
64 |
|
$model = $this->findModel($id); |
65 |
|
|
66 |
|
$model->enabled = !$model->enabled; |
67 |
|
$model->save(); |
68 |
|
|
69 |
|
return $this->smartGoBack(); |
70 |
|
} |
71 |
|
|
72 |
|
/** |
73 |
|
* Finds the ContentType model based on its primary key value. |
controllers/DeviceController.php 1 location
|
@@ 170-178 (lines=9) @@
|
167 |
|
* |
168 |
|
* @return \yii\web\Response |
169 |
|
*/ |
170 |
|
public function actionToggle($id) |
171 |
|
{ |
172 |
|
$model = $this->findModel($id); |
173 |
|
|
174 |
|
$model->enabled = !$model->enabled; |
175 |
|
$model->save(); |
176 |
|
|
177 |
|
return $this->smartGoBack(); |
178 |
|
} |
179 |
|
|
180 |
|
/** |
181 |
|
* Finds the Device model based on its primary key value. |