| 1 | <?php |
||
| 16 | class QuestionCategoryRepository extends AbstractRepository |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * Default sorting. |
||
| 20 | * |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | protected $defaultOrderings = ['sorting' => QueryInterface::ORDER_ASCENDING]; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Create query. |
||
| 27 | * |
||
| 28 | * @return QueryInterface |
||
| 29 | */ |
||
| 30 | public function createQuery(): QueryInterface |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Find the categories in the right order (default: default, $sorting=TRUE: alphabetical). |
||
| 41 | * |
||
| 42 | * @param int $topCategory |
||
| 43 | * @param bool $sorting |
||
| 44 | * |
||
| 45 | * @return array|QueryResultInterface |
||
| 46 | */ |
||
| 47 | public function findByParent(int $topCategory, bool $sorting = false) |
||
| 57 | } |
||
| 58 |