Exemplo n.º 1
0
 /**
  * @test
  */
 public function setSubgroupSetsSubgroups()
 {
     $subgroup = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
     $group = new \TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup('foo');
     $subgroup->attach($group);
     $this->subject->setSubgroup($subgroup);
     $this->assertSame($subgroup, $this->subject->getSubgroup());
 }
 /**
  * Returns collection of bookmarks for fe groups for a given fe group and list identifier
  *
  * @param \TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup $feGroup
  * @param string $listIdentifier
  * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_PtExtlist_Domain_Model_Bookmark_Bookmark>
  */
 public function findGroupBookmarksByFeGroupAndListIdentifier(\TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup $feGroup, $listIdentifier)
 {
     Tx_PtExtbase_Assertions_Assert::isNotEmptyString($listIdentifier, array('message' => 'List identifier must not be empty! 1283117067'));
     $query = $this->createQuery();
     $query->setOrderings(array('name' => 'ASC'));
     $query->matching($query->logicalAnd($query->logicalAnd($query->equals('feGroup', $feGroup->getUid()), $query->equals('listId', $listIdentifier)), $query->equals('type', Tx_PtExtlist_Domain_Model_Bookmark_Bookmark::PTEXTLIST_BOOKMARK_GROUP)));
     $result = $query->execute();
     return $result;
 }