show Character groups members in Seminarybar

This commit is contained in:
coderkun 2014-04-15 13:57:13 +02:00
commit bf16cb9c9d
4 changed files with 63 additions and 29 deletions

View file

@ -44,7 +44,7 @@
public function getGroupsroupsForSeminary($seminaryId)
{
return $this->db->query(
'SELECT id, name, url '.
'SELECT id, name, url, preferred '.
'FROM charactergroupsgroups '.
'WHERE seminary_id = ?',
'i',
@ -64,7 +64,7 @@
public function getGroupsgroupByUrl($seminaryId, $groupsgroupUrl)
{
$data = $this->db->query(
'SELECT id, name, url '.
'SELECT id, name, url, preferred '.
'FROM charactergroupsgroups '.
'WHERE seminary_id = ? AND url = ?',
'is',
@ -79,6 +79,31 @@
}
/**
* Get a Character groups-group by its ID.
*
* @throws IdNotFoundException
* @param string $groupsgroupId ID of the Character groups-group
* @return array Character groups-group data
*/
public function getGroupsgroupById($groupsgroupId)
{
$data = $this->db->query(
'SELECT id, name, url, preferred '.
'FROM charactergroupsgroups '.
'WHERE id = ?',
'i',
$groupsgroupId
);
if(empty($data)) {
throw new \nre\exceptions\IdNotFoundException($groupsgroupId);
}
return $data[0];
}
/**
* Get Character groups for a Character groups-group.
*