*/ class CallScriptRepository extends CommonRepository { public function getTableAlias(): string { return 'cs'; } /** * Loads the owner and category with the scripts, so that the list doesn't query them one by one. * * @param array $args */ public function getEntities(array $args = []) { $alias = $this->getTableAlias(); $args['qb'] = $this->createQueryBuilder($alias) ->select($alias, 'o', 'c') ->leftJoin($alias.'.owner', 'o') ->leftJoin($alias.'.category', 'c'); return parent::getEntities($args); } /** * The list's search box matches the name. * * @return array */ protected function addCatchAllWhereClause($q, $filter): array { return $this->addStandardCatchAllWhereClause($q, $filter, [ $this->getTableAlias().'.name', ]); } /** * @return array */ protected function getDefaultOrder(): array { return [ [$this->getTableAlias().'.name', 'ASC'], ]; } }