/** * Checks whether we should even render this whole thing. * * @return bool Whether to render the module. */ public function prepare() { $this->sorts = DiscussionModel::getAllowedSorts(); $this->filters = DiscussionModel::getAllowedFilters(); return !empty($this->sorts) || !empty($this->filters); }