You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
-
- namespace Lc\CaracoleBundle\Repository;
-
- use Lc\CaracoleBundle\Model\Section\SectionInterface;
-
- trait SectionStoreTrait
- {
- protected SectionInterface $section;
-
- public function setSection(SectionInterface $section):self
- {
- $this->section = $section;
-
- return $this;
- }
-
- public function getParents()
- {
- $query = $this->query->create();
- if ($this->section) {
- $query->filterBySection($this->section);
- }
- $query->filterIsParent();
-
- return $query->find();
- }
-
- }
|