public function getALL($conditions = "") { if (func_num_args() > 1) { exit("Wrong number of arguments in Comment::getAll()"); } return Model::getAll("Comment", $conditions); }
/** * Get all roles * * @param string $index The field to use as key in the returned array * @param array $fields The fields to get for each role. If not set, all table fields are got * @param array $order The order instructions for the returned array * @param bool $includeGuest If set to true, then include 'Guest' role to the result * * @return array The roles list */ public static function getAll($index = null, $fields = array(), $order = array(), $includeGuest = false) { if ($includeGuest) { return parent::getAll($index, $fields, $order); } else { $example = array('id' => array('$ne' => self::GUEST_ROLE_ID)); return self::getListByExample(new DBExample($example), $index, $fields, $order); } }
public function index() { $administrators = Model::getAll(); ipAddJs('Ip/Internal/Core/assets/js/angular.js'); ipAddJs('Ip/Internal/Administrators/assets/administratorsController.js'); foreach ($administrators as &$administrator) { unset($administrator['hash']); unset($administrator['resetSecret']); unset($administrator['resetTime']); $administrator['permissions'] = \Ip\Internal\AdminPermissionsModel::getUserPermissions($administrator['id']); } ipAddJsVariable('ipAdministrators', $administrators); ipAddJsVariable('ipAdministratorsAdminId', (int) ipAdminId()); ipaddJsVariable('ipAvailablePermissions', \Ip\Internal\AdminPermissionsModel::availablePermissions()); ipaddJsVariable('ipAdministratorId', ipAdminId()); ipaddJsVariable('ipAdministratorsSuperAdminWarning', __('You will not be able to set other permissions for yourself!', 'Ip-admin', false)); $data = array('createForm' => Helper::createForm(), 'updateForm' => Helper::updateForm()); return ipView('view/layout.php', $data)->render(); }
<?php require_once 'connection.php'; require_once 'models/model.php'; $q = $_GET['q']; $conn = getConnection(); $model = new Model($conn); $matches = $model->getAll(); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Paw to Heart</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/index.css"> <link rel="shortcut icon" href="data/logo2.png"> </head> <body> <?php include 'views/menu.php'; ?> <div class="container"> <!-- Full Width Image Header --> <header class="header-image"> <div class="headline"> <h1>Pets are family too.</h1> <h2>Let's find your family together.</h2>
public function getAll() { return parent::getAll('SELECT * FROM route'); }
public static function getAll() { return Model::getAll(); }
public function getAll($ids = null) { if (func_num_args() > 1) { exit("Wrong number of arguments in Post::getAll()"); } if (!is_null($ids)) { return Model::getAll('Post', 'WHERE id IN (' . join(',', $ids) . ')'); } return Model::getAll("Post"); }
public function get_list() { $sql = "SELECT id, menu \n\t\t\t\tFROM maipuwx_menu\n\t\t\t\tOrder By id ASC\n\t\t\t\t{$this->limit}"; return parent::getAll($sql); }