public function __construct(ProjectModel $project) { $this->slug = (string) $project->getSlug(); $this->name = (string) $project->getName(); $this->defaultLocale = (string) $project->getDefaultLocale(); $this->description = (string) $project->getDescription(); }
private function getLanguagesBag(Project $project) { $slug = (string) $project->getSlug(); if (!isset($this->languages[$slug])) { $this->languages[$slug] = new ArrayCollection(); } return $this->languages[$slug]; }