* @}
*/
+ /**
+ * @param array $fields Array of selected fields, empty for all
+ * @param array $condition Array of fields for condition
+ * @param array $params Array of several parameters
+ * @return array
+ * @throws \Exception
+ */
+ public static function select(array $fields = [], array $condition = [], array $params = [])
+ {
+ $statement = DBA::select('contact', $fields, $condition, $params);
+
+ return DBA::toArray($statement);
+ }
+
/**
* @param integer $id
* @return array|boolean Contact record if it exists, false otherwise
\r
$pager = new Pager($a->query_string, 30);\r
\r
- $statement = DBA::select('contact', [], $condition, ['limit' => [$pager->getStart(), $pager->getItemsPerPage()]]);\r
-\r
- $contacts = DBA::toArray($statement);\r
+ $contacts = Model\Contact::select([], $condition, ['limit' => [$pager->getStart(), $pager->getItemsPerPage()]]);\r
\r
$t = Renderer::getMarkupTemplate('admin/blocklist/contact.tpl');\r
$o = Renderer::replaceMacros($t, [\r