Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 12 |
ConfigController | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
20 | |
0.00% |
0 / 12 |
getAccessRules | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
|||
actionIndex | |
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 9 |
<?php | |
/** | |
* @link https://www.humhub.org/ | |
* @copyright Copyright (c) 2018 HumHub GmbH & Co. KG | |
* @license https://www.humhub.com/licences | |
* | |
*/ | |
namespace humhub\modules\tasks\controllers; | |
use Yii; | |
use yii\data\ActiveDataProvider; | |
use yii\helpers\Url; | |
use humhub\modules\admin\permissions\ManageModules; | |
use humhub\modules\admin\components\Controller; | |
use humhub\modules\tasks\models\SnippetModuleSettings; | |
use yii\web\HttpException; | |
/** | |
* | |
*/ | |
class ConfigController extends Controller | |
{ | |
/** | |
* @inheritdoc | |
*/ | |
public function getAccessRules() | |
{ | |
return [['permissions' => ManageModules::class]]; | |
} | |
/** | |
* Configuration action for system admins. | |
*/ | |
public function actionIndex() | |
{ | |
$model = new SnippetModuleSettings(); | |
if ($model->load(Yii::$app->request->post()) && $model->save()) { | |
$this->view->saved(); | |
} | |
return $this->render('snippet', [ | |
'model' => $model | |
]); | |
} | |
} |