public function getTheme($id) { if (null !== $this->themes) { foreach ($this->themes as $theme) { if (strtolower($theme->getId()) == strtolower($id)) { return $theme; } } } }