Exemplo n.º 1
0
 public function testGetGetterRelatedBy()
 {
     $objectA = new \Issue656TestObject();
     $objectA->setName('A');
     $objectB = new \Issue656TestObject();
     $objectB->setName('B');
     $collection = new ObjectCollection();
     $collection->push($objectB);
     $objectA->setIssue656TestObjectsRelatedByTo($collection);
     $this->assertEquals($collection, $objectA->getIssue656TestObjectsRelatedByTo());
 }
Exemplo n.º 2
0
 /**
  * Remove gallery of this object
  * through the images_galleries_map cross reference table.
  *
  * @param ChildGallery $gallery
  * @return ChildImage The current object (for fluent API support)
  */
 public function removeGallery(ChildGallery $gallery)
 {
     if ($this->getGalleries()->contains($gallery)) {
         $imageGalleryMap = new ChildImageGalleryMap();
         $imageGalleryMap->setGallery($gallery);
         if ($gallery->isImagesLoaded()) {
             //remove the back reference if available
             $gallery->getImages()->removeObject($this);
         }
         $imageGalleryMap->setImage($this);
         $this->removeImageGalleryMap(clone $imageGalleryMap);
         $imageGalleryMap->clear();
         $this->collGalleries->remove($this->collGalleries->search($gallery));
         if (null === $this->galleriesScheduledForDeletion) {
             $this->galleriesScheduledForDeletion = clone $this->collGalleries;
             $this->galleriesScheduledForDeletion->clear();
         }
         $this->galleriesScheduledForDeletion->push($gallery);
     }
     return $this;
 }
Exemplo n.º 3
0
 /**
  * Remove formats of this object
  * through the R_templatenames_inchapter cross reference table.
  *
  * @param ChildFormats $formats
  * @return ChildTemplatenames The current object (for fluent API support)
  */
 public function removeFormats(ChildFormats $formats)
 {
     if ($this->getFormatss()->contains($formats)) {
         $rTemplatenamesInchapter = new ChildRTemplatenamesInchapter();
         $rTemplatenamesInchapter->setFormats($formats);
         if ($formats->isTemplatenamessLoaded()) {
             //remove the back reference if available
             $formats->getTemplatenamess()->removeObject($this);
         }
         $rTemplatenamesInchapter->setTemplatenames($this);
         $this->removeRTemplatenamesInchapter(clone $rTemplatenamesInchapter);
         $rTemplatenamesInchapter->clear();
         $this->collFormatss->remove($this->collFormatss->search($formats));
         if (null === $this->formatssScheduledForDeletion) {
             $this->formatssScheduledForDeletion = clone $this->collFormatss;
             $this->formatssScheduledForDeletion->clear();
         }
         $this->formatssScheduledForDeletion->push($formats);
     }
     return $this;
 }
Exemplo n.º 4
0
 /**
  * Remove services of this object
  * through the object_services cross reference table.
  *
  * @param ChildServices $services
  * @return ChildObject The current object (for fluent API support)
  */
 public function removeServices(ChildServices $services)
 {
     if ($this->getServicess()->contains($services)) {
         $objectServices = new ChildObjectServices();
         $objectServices->setServices($services);
         if ($services->isObjectsLoaded()) {
             //remove the back reference if available
             $services->getObjects()->removeObject($this);
         }
         $objectServices->setObject($this);
         $this->removeObjectServices(clone $objectServices);
         $objectServices->clear();
         $this->collServicess->remove($this->collServicess->search($services));
         if (null === $this->servicessScheduledForDeletion) {
             $this->servicessScheduledForDeletion = clone $this->collServicess;
             $this->servicessScheduledForDeletion->clear();
         }
         $this->servicessScheduledForDeletion->push($services);
     }
     return $this;
 }
Exemplo n.º 5
0
 /**
  * Remove localization of this object
  * through the kk_localization_variant cross reference table.
  *
  * @param ChildLocalization $localization
  * @return ChildLanguageVariant The current object (for fluent API support)
  */
 public function removeLocalization(ChildLocalization $localization)
 {
     if ($this->getLocalizations()->contains($localization)) {
         $localizationVariant = new ChildLocalizationVariant();
         $localizationVariant->setLocalization($localization);
         if ($localization->isLanguageVariantsLoaded()) {
             //remove the back reference if available
             $localization->getLanguageVariants()->removeObject($this);
         }
         $localizationVariant->setLanguageVariant($this);
         $this->removeLocalizationVariant(clone $localizationVariant);
         $localizationVariant->clear();
         $this->collLocalizations->remove($this->collLocalizations->search($localization));
         if (null === $this->localizationsScheduledForDeletion) {
             $this->localizationsScheduledForDeletion = clone $this->collLocalizations;
             $this->localizationsScheduledForDeletion->clear();
         }
         $this->localizationsScheduledForDeletion->push($localization);
     }
     return $this;
 }
Exemplo n.º 6
0
 /**
  * Remove skill of this object
  * through the kk_trixionary_skill_group cross reference table.
  *
  * @param ChildSkill $skill
  * @return ChildGroup The current object (for fluent API support)
  */
 public function removeSkill(ChildSkill $skill)
 {
     if ($this->getSkills()->contains($skill)) {
         $skillGroup = new ChildSkillGroup();
         $skillGroup->setSkill($skill);
         if ($skill->isGroupsLoaded()) {
             //remove the back reference if available
             $skill->getGroups()->removeObject($this);
         }
         $skillGroup->setGroup($this);
         $this->removeSkillGroup(clone $skillGroup);
         $skillGroup->clear();
         $this->collSkills->remove($this->collSkills->search($skill));
         if (null === $this->skillsScheduledForDeletion) {
             $this->skillsScheduledForDeletion = clone $this->collSkills;
             $this->skillsScheduledForDeletion->clear();
         }
         $this->skillsScheduledForDeletion->push($skill);
     }
     return $this;
 }
Exemplo n.º 7
0
 /**
  * Remove user of this object
  * through the user_group cross reference table.
  *
  * @param ChildUser $user
  * @return ChildGroup The current object (for fluent API support)
  */
 public function removeUser(ChildUser $user)
 {
     if ($this->getUsers()->contains($user)) {
         $userGroup = new ChildUserGroup();
         $userGroup->setUser($user);
         if ($user->isGroupsLoaded()) {
             //remove the back reference if available
             $user->getGroups()->removeObject($this);
         }
         $userGroup->setGroup($this);
         $this->removeUserGroup(clone $userGroup);
         $userGroup->clear();
         $this->collUsers->remove($this->collUsers->search($user));
         if (null === $this->usersScheduledForDeletion) {
             $this->usersScheduledForDeletion = clone $this->collUsers;
             $this->usersScheduledForDeletion->clear();
         }
         $this->usersScheduledForDeletion->push($user);
     }
     return $this;
 }
Exemplo n.º 8
0
 /**
  * Remove rights of this object
  * through the R_rights_foruser cross reference table.
  *
  * @param ChildRights $rights
  * @return ChildUsers The current object (for fluent API support)
  */
 public function removeRights(ChildRights $rights)
 {
     if ($this->getRightss()->contains($rights)) {
         $rRightsForuser = new ChildRRightsForuser();
         $rRightsForuser->setRights($rights);
         if ($rights->isUserssLoaded()) {
             //remove the back reference if available
             $rights->getUserss()->removeObject($this);
         }
         $rRightsForuser->setUsers($this);
         $this->removeRRightsForuser(clone $rRightsForuser);
         $rRightsForuser->clear();
         $this->collRightss->remove($this->collRightss->search($rights));
         if (null === $this->rightssScheduledForDeletion) {
             $this->rightssScheduledForDeletion = clone $this->collRightss;
             $this->rightssScheduledForDeletion->clear();
         }
         $this->rightssScheduledForDeletion->push($rights);
     }
     return $this;
 }
Exemplo n.º 9
0
 /**
  * Remove object of this object
  * through the object_category cross reference table.
  *
  * @param ChildObject $object
  * @return ChildCategory The current object (for fluent API support)
  */
 public function removeObject(ChildObject $object)
 {
     if ($this->getObjects()->contains($object)) {
         $objectCategory = new ChildObjectCategory();
         $objectCategory->setObject($object);
         if ($object->isCategoriesLoaded()) {
             //remove the back reference if available
             $object->getCategories()->removeObject($this);
         }
         $objectCategory->setCategory($this);
         $this->removeObjectCategory(clone $objectCategory);
         $objectCategory->clear();
         $this->collObjects->remove($this->collObjects->search($object));
         if (null === $this->objectsScheduledForDeletion) {
             $this->objectsScheduledForDeletion = clone $this->collObjects;
             $this->objectsScheduledForDeletion->clear();
         }
         $this->objectsScheduledForDeletion->push($object);
     }
     return $this;
 }
Exemplo n.º 10
0
 /**
  * {@inheritdoc}
  */
 public function push($value)
 {
     parent::push(func_get_args());
 }
Exemplo n.º 11
0
 /**
  * Remove wine of this object
  * through the tasted_wine cross reference table.
  *
  * @param ChildWine $wine
  * @return ChildUser The current object (for fluent API support)
  */
 public function removeWine(ChildWine $wine)
 {
     if ($this->getWines()->contains($wine)) {
         $tastedWine = new ChildTastedWine();
         $tastedWine->setWine($wine);
         if ($wine->isUsersLoaded()) {
             //remove the back reference if available
             $wine->getUsers()->removeObject($this);
         }
         $tastedWine->setUser($this);
         $this->removeTastedWine(clone $tastedWine);
         $tastedWine->clear();
         $this->collWines->remove($this->collWines->search($wine));
         if (null === $this->winesScheduledForDeletion) {
             $this->winesScheduledForDeletion = clone $this->collWines;
             $this->winesScheduledForDeletion->clear();
         }
         $this->winesScheduledForDeletion->push($wine);
     }
     return $this;
 }
Exemplo n.º 12
0
 /**
  * Remove permission of this object
  * through the role_permission cross reference table.
  *
  * @param ChildPermission $permission
  * @return ChildRole The current object (for fluent API support)
  */
 public function removePermission(ChildPermission $permission)
 {
     if ($this->getPermissions()->contains($permission)) {
         $rolePermission = new ChildRolePermission();
         $rolePermission->setPermission($permission);
         if ($permission->isRolesLoaded()) {
             //remove the back reference if available
             $permission->getRoles()->removeObject($this);
         }
         $rolePermission->setRole($this);
         $this->removeRolePermission(clone $rolePermission);
         $rolePermission->clear();
         $this->collPermissions->remove($this->collPermissions->search($permission));
         if (null === $this->permissionsScheduledForDeletion) {
             $this->permissionsScheduledForDeletion = clone $this->collPermissions;
             $this->permissionsScheduledForDeletion->clear();
         }
         $this->permissionsScheduledForDeletion->push($permission);
     }
     return $this;
 }
Exemplo n.º 13
0
 /**
  * Remove xmlIssue of this object
  * through the R_issues_xmlplugin cross reference table.
  *
  * @param ChildIssues $xmlIssue
  * @return ChildPlugins The current object (for fluent API support)
  */
 public function removeXmlIssue(ChildIssues $xmlIssue)
 {
     if ($this->getXmlIssues()->contains($xmlIssue)) {
         $rIssuesXmlplugin = new ChildRIssuesXmlplugin();
         $rIssuesXmlplugin->setXmlIssue($xmlIssue);
         if ($xmlIssue->isXmlPluginsLoaded()) {
             //remove the back reference if available
             $xmlIssue->getXmlPlugins()->removeObject($this);
         }
         $rIssuesXmlplugin->setXmlPlugin($this);
         $this->removeRIssuesXmlplugin(clone $rIssuesXmlplugin);
         $rIssuesXmlplugin->clear();
         $this->collXmlIssues->remove($this->collXmlIssues->search($xmlIssue));
         if (null === $this->xmlIssuesScheduledForDeletion) {
             $this->xmlIssuesScheduledForDeletion = clone $this->collXmlIssues;
             $this->xmlIssuesScheduledForDeletion->clear();
         }
         $this->xmlIssuesScheduledForDeletion->push($xmlIssue);
     }
     return $this;
 }
Exemplo n.º 14
0
 /**
  * Remove group of this object
  * through the kk_group_action cross reference table.
  *
  * @param ChildGroup $group
  * @return ChildAction The current object (for fluent API support)
  */
 public function removeGroup(ChildGroup $group)
 {
     if ($this->getGroups()->contains($group)) {
         $groupAction = new ChildGroupAction();
         $groupAction->setGroup($group);
         if ($group->isActionsLoaded()) {
             //remove the back reference if available
             $group->getActions()->removeObject($this);
         }
         $groupAction->setAction($this);
         $this->removeGroupAction(clone $groupAction);
         $groupAction->clear();
         $this->collGroups->remove($this->collGroups->search($group));
         if (null === $this->groupsScheduledForDeletion) {
             $this->groupsScheduledForDeletion = clone $this->collGroups;
             $this->groupsScheduledForDeletion->clear();
         }
         $this->groupsScheduledForDeletion->push($group);
     }
     return $this;
 }
Exemplo n.º 15
0
 /**
  * Remove lyric of this object
  * through the lyric_language cross reference table.
  *
  * @param ChildLyric $lyric
  * @return ChildLanguage The current object (for fluent API support)
  */
 public function removeLyric(ChildLyric $lyric)
 {
     if ($this->getLyrics()->contains($lyric)) {
         $lyricLanguage = new LyricLanguage();
         $lyricLanguage->setLyric($lyric);
         if ($lyric->isLanguagesLoaded()) {
             //remove the back reference if available
             $lyric->getLanguages()->removeObject($this);
         }
         $lyricLanguage->setLanguage($this);
         $this->removeLyricLanguage(clone $lyricLanguage);
         $lyricLanguage->clear();
         $this->collLyrics->remove($this->collLyrics->search($lyric));
         if (null === $this->lyricsScheduledForDeletion) {
             $this->lyricsScheduledForDeletion = clone $this->collLyrics;
             $this->lyricsScheduledForDeletion->clear();
         }
         $this->lyricsScheduledForDeletion->push($lyric);
     }
     return $this;
 }
Exemplo n.º 16
0
 /**
  * Remove templatenames of this object
  * through the R_templatenames_forbook cross reference table.
  *
  * @param ChildTemplatenames $templatenames
  * @return ChildBooks The current object (for fluent API support)
  */
 public function removeTemplatenames(ChildTemplatenames $templatenames)
 {
     if ($this->getTemplatenamess()->contains($templatenames)) {
         $rTemplatenamesForbook = new ChildRTemplatenamesForbook();
         $rTemplatenamesForbook->setTemplatenames($templatenames);
         if ($templatenames->isBookssLoaded()) {
             //remove the back reference if available
             $templatenames->getBookss()->removeObject($this);
         }
         $rTemplatenamesForbook->setBooks($this);
         $this->removeRTemplatenamesForbook(clone $rTemplatenamesForbook);
         $rTemplatenamesForbook->clear();
         $this->collTemplatenamess->remove($this->collTemplatenamess->search($templatenames));
         if (null === $this->templatenamessScheduledForDeletion) {
             $this->templatenamessScheduledForDeletion = clone $this->collTemplatenamess;
             $this->templatenamessScheduledForDeletion->clear();
         }
         $this->templatenamessScheduledForDeletion->push($templatenames);
     }
     return $this;
 }
Exemplo n.º 17
0
 private function findExperts($socCode)
 {
     $groups = ExpertGroupQuery::create()->findBySocCode($socCode);
     $result = new ObjectCollection();
     foreach ($groups as $group) {
         $experts = \ExpertGroupMembersQuery::create()->findByGroupName($group->getGroupName());
         foreach ($experts as $expert) {
             $result->push($expert);
         }
     }
     return $result;
 }
Exemplo n.º 18
0
 /**
  * Remove structureNodeRelatedByStructureNodeId of this object
  * through the kk_trixionary_structure_node_parent cross reference table.
  *
  * @param ChildStructureNode $structureNodeRelatedByStructureNodeId
  * @return ChildStructureNode The current object (for fluent API support)
  */
 public function removeStructureNodeRelatedByStructureNodeId(ChildStructureNode $structureNodeRelatedByStructureNodeId)
 {
     if ($this->getStructureNodesRelatedByStructureNodeId()->contains($structureNodeRelatedByStructureNodeId)) {
         $structureNodeParent = new ChildStructureNodeParent();
         $structureNodeParent->setStructureNodeRelatedByStructureNodeId($structureNodeRelatedByStructureNodeId);
         if ($structureNodeRelatedByStructureNodeId->isStructureNodeRelatedByParentIdsLoaded()) {
             //remove the back reference if available
             $structureNodeRelatedByStructureNodeId->getStructureNodeRelatedByParentIds()->removeObject($this);
         }
         $structureNodeParent->setStructureNodeRelatedByParentId($this);
         $this->removeStructureNodeParentRelatedByParentId(clone $structureNodeParent);
         $structureNodeParent->clear();
         $this->collStructureNodesRelatedByStructureNodeId->remove($this->collStructureNodesRelatedByStructureNodeId->search($structureNodeRelatedByStructureNodeId));
         if (null === $this->structureNodesRelatedByStructureNodeIdScheduledForDeletion) {
             $this->structureNodesRelatedByStructureNodeIdScheduledForDeletion = clone $this->collStructureNodesRelatedByStructureNodeId;
             $this->structureNodesRelatedByStructureNodeIdScheduledForDeletion->clear();
         }
         $this->structureNodesRelatedByStructureNodeIdScheduledForDeletion->push($structureNodeRelatedByStructureNodeId);
     }
     return $this;
 }
 /**
  * Remove dgmAttributeTypes of this object
  * through the dgmtypeattributes cross reference table.
  * 
  * @param ChildDgmAttributeTypes $dgmAttributeTypes
  * @return ChildInvTypes The current object (for fluent API support)
  */
 public function removeDgmAttributeTypes(ChildDgmAttributeTypes $dgmAttributeTypes)
 {
     if ($this->getDgmAttributeTypess()->contains($dgmAttributeTypes)) {
         $dgmTypeAttributes = new ChildDgmTypeAttributes();
         $dgmTypeAttributes->setDgmAttributeTypes($dgmAttributeTypes);
         if ($dgmAttributeTypes->isInvTypessLoaded()) {
             //remove the back reference if available
             $dgmAttributeTypes->getInvTypess()->removeObject($this);
         }
         $dgmTypeAttributes->setInvTypes($this);
         $this->removeDgmTypeAttributes(clone $dgmTypeAttributes);
         $dgmTypeAttributes->clear();
         $this->collDgmAttributeTypess->remove($this->collDgmAttributeTypess->search($dgmAttributeTypes));
         if (null === $this->dgmAttributeTypessScheduledForDeletion) {
             $this->dgmAttributeTypessScheduledForDeletion = clone $this->collDgmAttributeTypess;
             $this->dgmAttributeTypessScheduledForDeletion->clear();
         }
         $this->dgmAttributeTypessScheduledForDeletion->push($dgmAttributeTypes);
     }
     return $this;
 }
Exemplo n.º 20
0
 /**
  * Remove templates of this object
  * through the R_fieldpostprocessor_forfield cross reference table.
  *
  * @param ChildTemplates $templates
  * @return ChildFieldpostprocessor The current object (for fluent API support)
  */
 public function removeTemplates(ChildTemplates $templates)
 {
     if ($this->getTemplatess()->contains($templates)) {
         $rFieldpostprocessorForfield = new ChildRFieldpostprocessorForfield();
         $rFieldpostprocessorForfield->setTemplates($templates);
         if ($templates->isFieldpostprocessorsLoaded()) {
             //remove the back reference if available
             $templates->getFieldpostprocessors()->removeObject($this);
         }
         $rFieldpostprocessorForfield->setFieldpostprocessor($this);
         $this->removeRFieldpostprocessorForfield(clone $rFieldpostprocessorForfield);
         $rFieldpostprocessorForfield->clear();
         $this->collTemplatess->remove($this->collTemplatess->search($templates));
         if (null === $this->templatessScheduledForDeletion) {
             $this->templatessScheduledForDeletion = clone $this->collTemplatess;
             $this->templatessScheduledForDeletion->clear();
         }
         $this->templatessScheduledForDeletion->push($templates);
     }
     return $this;
 }
Exemplo n.º 21
0
 /**
  * Remove role of this object
  * through the user_role cross reference table.
  *
  * @param ChildRole $role
  * @return ChildUser The current object (for fluent API support)
  */
 public function removeRole(ChildRole $role)
 {
     if ($this->getRoles()->contains($role)) {
         $userRole = new ChildUserRole();
         $userRole->setRole($role);
         if ($role->isUsersLoaded()) {
             //remove the back reference if available
             $role->getUsers()->removeObject($this);
         }
         $userRole->setUser($this);
         $this->removeUserRole(clone $userRole);
         $userRole->clear();
         $this->collRoles->remove($this->collRoles->search($role));
         if (null === $this->rolesScheduledForDeletion) {
             $this->rolesScheduledForDeletion = clone $this->collRoles;
             $this->rolesScheduledForDeletion->clear();
         }
         $this->rolesScheduledForDeletion->push($role);
     }
     return $this;
 }
Exemplo n.º 22
0
 /**
  * Remove books of this object
  * through the R_batch_forbook cross reference table.
  *
  * @param ChildBooks $books
  * @return ChildBatch The current object (for fluent API support)
  */
 public function removeBooks(ChildBooks $books)
 {
     if ($this->getBookss()->contains($books)) {
         $rBatchForbook = new ChildRBatchForbook();
         $rBatchForbook->setBooks($books);
         if ($books->isBatchesLoaded()) {
             //remove the back reference if available
             $books->getBatches()->removeObject($this);
         }
         $rBatchForbook->setBatch($this);
         $this->removeRBatchForbook(clone $rBatchForbook);
         $rBatchForbook->clear();
         $this->collBookss->remove($this->collBookss->search($books));
         if (null === $this->bookssScheduledForDeletion) {
             $this->bookssScheduledForDeletion = clone $this->collBookss;
             $this->bookssScheduledForDeletion->clear();
         }
         $this->bookssScheduledForDeletion->push($books);
     }
     return $this;
 }