/** * Attempts to get a theme for the array of slugs. The first * matching theme wins. * * @param array $slugs * @return \Cartalyst\Themes\ThemeInterface * @throws \RuntimeException */ public function getThemeForSlugs(array $slugs) { foreach ($slugs as $slug) { try { return $this->themeBag->ensureRegistered($slug); } catch (RuntimeException $e) { } } throw new RuntimeException('Couldn\'t match [' . implode(', ', $slugs) . '] to any themes.'); }