Add user filter/condition for notifications

This commit is contained in:
Frederic Guillot
2015-06-07 20:06:31 -04:00
parent 9d9e3afba2
commit 4f32352fe6
15 changed files with 582 additions and 249 deletions

View File

@@ -143,4 +143,23 @@ abstract class Base extends \Core\Base
'url' => $this->helper->url->to('task', 'show', array('task_id' => $task['id'], 'project_id' => $task['project_id'])),
);
}
/**
* Group a collection of records by a column
*
* @access public
* @param array $collection
* @param string $column
* @return array
*/
public function groupByColumn(array $collection, $column)
{
$result = array();
foreach ($collection as $item) {
$result[$item[$column]][] = $item;
}
return $result;
}
}