function processAdmin() { $this->fillFromRequest(); $search = new Search(array($this->getClass())); $colums = array_merge($this->datasWith("list"), array("deleteAction", "viewAction", "updateAction")); return $search->processSearch($this->toArray(), $colums); }
/** * * processAdmin * * When the form is sent, processAdmin analyzes data sent and verifies that * data will be listed and finally send data to "Search" class which will * return results from the database to display them in showAdmin. * * @param int $start * @param int $limit * @return string */ function processAdmin($start = 1, $limit = null) { if ($start < 1) { $start = 1; } $position = ($start - 1) * $limit; $this->fillFromRequest(); $search = new Search(array($this->getClass())); $admin = $this->encodeURL(array(), 'showAdmin'); $colums = array_merge($this->datasWith("list"), array("deleteAction", "viewAction", "updateAction")); $tableAdmin = $search->processSearch($this->toArray(), $colums, $position, $limit); $totalRecords = $search->total; $links = $this->makePaging($start, $limit, $totalRecords); return $tableAdmin . $links; }