Skip to content

Commit

Permalink
Merge pull request #32 from geraldurbas/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndr-w authored Jul 7, 2024
2 parents 5244099 + c74f6f3 commit 63c1cfb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/qanda_category.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,20 @@ public function find(int $status = 1): ?rex_yform_manager_collection
{
return qanda::query()->where('status', $status, '>=')->whereListContains('category_ids', $this->getId())->find();
}


/**
* Findet alle Fragen, die zu dieser Kategorie gehören.
* Finds all questions that belong to this category.
*
* @return rex_yform_manager_collection|null
*
* Beispiel / Example:
* $questions = $category->getAllQuestions();
*/
public function getAllQuestions()
{
return qanda::query()->where('status', 0, ">")->whereListContains('category_ids',$this->id)
->find();
}
}

0 comments on commit 63c1cfb

Please sign in to comment.