Transfer few methods from model database to propers tables models

This commit is contained in:
osaajani 2019-11-06 18:32:07 +01:00
parent f1170c82ea
commit 155cace466
6 changed files with 33 additions and 93 deletions

View file

@ -58,6 +58,19 @@ namespace models;
return isset($contacts[0]) ? $contacts[0] : false;
}
/**
* Get contacts of a particular group
*
* @param int $id_group : Id of the group we want contacts for
* @return array
*/
public function get_by_group($id_group)
{
$contacts = $this->_select('contact', ['id_group' => $id_group]);
return $contacts;
}
/**
* Retourne une liste de contactes sous forme d'un tableau.