*/ class StakeholderRepository extends CommonRepository { use CountsItemsByTypeTrait; public function getTableAlias(): string { return 'ps'; } /** * The list's search box matches the name, email, role and type. Core passes the filter * as an object with ->string and ->strict (its own docblock), not an array. * * @param \stdClass $filter * * @return array */ protected function addCatchAllWhereClause($q, $filter): array { return $this->addStandardCatchAllWhereClause($q, $filter, [ $this->getTableAlias().'.name', $this->getTableAlias().'.email', $this->getTableAlias().'.role', $this->getTableAlias().'.type', ]); } /** * @return array */ protected function getDefaultOrder(): array { return [ [$this->getTableAlias().'.name', 'ASC'], ]; } }