Пример #1
0
 /**
  * Find all resources for type/customer
  *
  * @param \GK\Stdapp\Domain\Model\Customer $customer
  * @return \GK\Stdapp\Domain\Model\PortalUser
  */
 public function findOneByCustomer(\GK\Stdapp\Domain\Model\Customer $customer)
 {
     $querySettings = $this->objectManager->create('Tx_Extbase_Persistence_Typo3QuerySettings');
     $querySettings->setRespectStoragePage(FALSE);
     $this->setDefaultQuerySettings($querySettings);
     $query = $this->createQuery();
     $constraints = array();
     $constraints[] = $query->equals('customer', $customer->getUid());
     $query->matching($query->logicalAnd($constraints));
     return $query->execute()->getFirst();
 }
Пример #2
0
 /**
  * @test
  */
 public function removeLanguageFromObjectStorageHoldingLanguages()
 {
     $language = new \GK\Stdapp\Domain\Model\Language();
     $localObjectStorage = new \TYPO3\CMS\Extbase\Persistence\Generic\ObjectStorage();
     $localObjectStorage->attach($language);
     $localObjectStorage->detach($language);
     $this->fixture->addLanguage($language);
     $this->fixture->removeLanguage($language);
     $this->assertEquals($localObjectStorage, $this->fixture->getLanguages());
 }