/
Ladlen
/
apple
Обзор
Документация
Войти
/
Ladlen
/
apple
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
backend/controllers/ItemController.php
36 строк
953 B
dmitriy-dolgov
comment removed
25 апр 2020, 20:27
25 апр 2020, 20:27
b0d8e1a
Код
Авторство
О чём код?
<?php namespace backend\controllers; use common\models\AppleList; use Yii; use yii\web\Controller; class ItemController extends Controller { public function actionGenerateItems() { $from = Yii::$app->request->post('amount')['from']; $to = Yii::$app->request->post('amount')['to']; $appleList = new AppleList(Yii::$app->user->identity); $appleList->clear(); $appleList->init($from, $to); $this->goHome(); } public function actionHandleStateFunction() { $appleId = Yii::$app->request->post('apple-id'); $functionName = Yii::$app->request->post('state-function'); $functionParam = false; if ($functionName) { $functionParam = Yii::$app->request->post('sfn-' . $functionName); } AppleList::handleAppleFunction($appleId, $functionName, $functionParam); $this->goHome(); } }