backend\controllers\StoreController::actionItems PHP Метод

actionItems() публичный Метод

public actionItems ( $id )
    public function actionItems($id)
    {
        $list = Store::getKeyValuePairs($id);
        $output = ['status' => 'ok', 'html' => ''];
        foreach ($list as $key => $value) {
            $output['html'] .= '<option value="' . $key . '">' . $value . '</option>';
        }
        Yii::$app->response->format = Response::FORMAT_JSON;
        return $output;
    }