protected function getSources() { $sources = Source::get($this->organisation->id); $output = array('' => lang('All')); if ($sources->hasRows()) { foreach ($sources as $source) { $output[$source->id] = $source->name; } } return $output; }
public function __construct() { parent::__construct(); $this->prependSiteTitle(lang('Sources')); $this->sources = Source::get($this->activeOrganisation->id, 20); }