Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function getOrganizations($onlyActive = false)
 {
     if ($onlyActive) {
         return $this->organizations->filter(function (Organization $organization) {
             return $organization->isEnabled() === true;
         });
     }
     return $this->organizations;
 }
Пример #2
0
 public function addOrganization(Organization $organization)
 {
     $this->organizations->add($organization);
 }
Пример #3
0
 public function addOrganization(Organization $organization)
 {
     if (!$this->organizations->contains($organization)) {
         $this->organizations->add($organization);
     }
 }