TYPO3 CMS  TYPO3_6-2
SysNoteRepository.php
Go to the documentation of this file.
1 <?php
3 
24 
30  public function initializeObject() {
31  $querySettings = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings');
32  $querySettings->setRespectStoragePage(FALSE);
33  $this->setDefaultQuerySettings($querySettings);
34  }
35 
43  public function findByPidsAndAuthor($pids, \TYPO3\CMS\Extbase\Domain\Model\BackendUser $author) {
44  $pids = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', (string) $pids);
45  $query = $this->createQuery();
46  $query->setOrderings(array(
47  'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING,
48  'creationDate' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING
49  ));
50  $query->matching(
51  $query->logicalAnd(
52  $query->in('pid', $pids),
53  $query->logicalOr(
54  $query->equals('personal', 0),
55  $query->equals('author', $author)
56  )
57  )
58  );
59  return $query->execute();
60  }
61 
62 }
static intExplode($delimiter, $string, $removeEmptyValues=FALSE, $limit=0)
findByPidsAndAuthor($pids, \TYPO3\CMS\Extbase\Domain\Model\BackendUser $author)
setDefaultQuerySettings(\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface $defaultQuerySettings)
Definition: Repository.php:240