|
@@ -4,15 +4,22 @@
|
|
|
|
|
|
|
|
namespace Meramo\Begriffmgt\Domain\Repository;
|
|
namespace Meramo\Begriffmgt\Domain\Repository;
|
|
|
|
|
|
|
|
|
|
+ use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
|
|
use TYPO3\CMS\Extbase\Persistence\Repository;
|
|
use TYPO3\CMS\Extbase\Persistence\Repository;
|
|
|
use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings;
|
|
use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings;
|
|
|
|
|
|
|
|
class TermRepository extends Repository
|
|
class TermRepository extends Repository
|
|
|
- {
|
|
|
|
|
- public function initializeObject() {
|
|
|
|
|
- $querySettings = $this->objectManager->get(Typo3QuerySettings::class);
|
|
|
|
|
- $querySettings->setRespectStoragePage(false);
|
|
|
|
|
- $this->setDefaultQuerySettings($querySettings);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Find all records and order them by 'term' in ascending order.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface|array
|
|
|
|
|
+ */
|
|
|
|
|
+ public function findAllOrderedByTerm()
|
|
|
|
|
+ {
|
|
|
|
|
+ $query = $this->createQuery();
|
|
|
|
|
+ $query->setOrderings(['term' => QueryInterface::ORDER_ASCENDING]);
|
|
|
|
|
|
|
|
|
|
+ return $query->execute();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|