/** * put your comment there... * * @param mixed $offset * @param mixed $iPerPage * @param mixed $blockId * @param mixed $typeParams * @return CJT_Models_Block_Assignmentpanel_Auxiliarybase */ public function __construct($offset, $iPerPage, $blockId, $typeParams) { // Initialize. $this->auxHelper = new CJT_Models_Block_Assignmentpanel_Helpers_Auxiliary(); // Initialize parent. parent::__construct($offset, $iPerPage, $blockId, $typeParams); }
/** * Get assigment panel objects page. * */ public function getAPOPAction() { // Read inputs. $iPerPage = (int) $_GET['iPerPage']; $blockId = (int) $_GET['block']; $oTypeParams = $_GET['typeParams']; $offset = $_GET['index']; $assignedOnly = $_GET['assignedOnly'] == 'false' ? false : true; $initialize = $_GET['initialize'] == 'false' ? false : true; // Get the corresponding type object // for handling the request. $typeName = $oTypeParams['targetType']; /** * put your comment there... * * @var CJT_Models_Block_Assignmentpanel_Base */ $typeObject = CJT_Models_Block_Assignmentpanel_Base::getInstance($assignedOnly, $typeName, $offset, $iPerPage, $blockId, $oTypeParams); // Fetch next page. $items = $typeObject->getItems(); // Return result $this->response['count'] = count($items); $this->response['items'] = $items; // Return count only when the list is activated for // the first time. if ($initialize) { $this->response['total'] = $typeObject->getTotalCount(); } }