/** * {@inheritdoc} */ public function getOrganizations($onlyActive = false) { if ($onlyActive) { return $this->organizations->filter(function (Organization $organization) { return $organization->isEnabled() === true; }); } return $this->organizations; }
public function addOrganization(Organization $organization) { $this->organizations->add($organization); }
public function addOrganization(Organization $organization) { if (!$this->organizations->contains($organization)) { $this->organizations->add($organization); } }