public function listNotBelongingJsonAction() { $properties = array(); $staff = \StaffAuthenticationBackend::getUser(); if (isset($staff)) { $items = \model\Equipment::findByNotStaffId($staff->getId()); } foreach ($items as $item) { $properties[] = $item->getJsonProperties(); } echo json_encode($properties); }
<?php /********************************************************************* index.php Equipment index Alex P <*****@*****.**> Copyright (c) 2013 XpressTek http://www.xpresstek.net Released under the GNU General Public License WITHOUT ANY WARRANTY. See LICENSE.TXT for details. vim: expandtab sw=4 ts=4 sts=4: **********************************************************************/ define('ROOT_PATH', '../'); require_once '../client.inc.php'; if (!\model\Equipment::countPublishedEquipment()) { header('Location: ../'); exit; } require_once CLIENTINC_DIR . 'header.inc.php'; $dashboard = new \controller\Dashboard(); if (isset($dashboard)) { $dashboard->viewClientPage(); } require_once CLIENTINC_DIR . 'footer.inc.php';
private function getItemTreeObject($status_id, $category_id, $color) { $kids = array(); $items = \model\Equipment::findByStatusAndCategory($status_id, $category_id); foreach ($items as $item) { $data = array(); $data['label'] = $item->getAsset_id(); $data['data'] = $item->getId(); $data['leaf'] = true; $data['children'] = null; $data['color'] = $color; $kids[] = $data; } return $kids; }