<?php defined('SYSPATH') or die('No direct script access.'); /** Получение списка групп, курсов, предметов, и т.д. */ class Controller_Handler_GetData extends Controller_Handler { public function before() { parent::before(); $this->user->checkAccess(User::RIGHTS_AUTHORIZED); // todo: is it? } public function action_GetDisciplinesForGroup() { $response['data'] = Model_Group::with($_POST['groupID']) ->getDisciplines($lazy = false, $this->post['semesterID']); $response['success'] = true; $this->response->body(json_encode($response)); } }