public function add(PageType $pageType) { $this->pageTypes[$pageType->getId()] = $pageType; if (!($routeNames = $pageType->getRouteNames())) { return $this; } foreach ($routeNames as $routeName) { $this->pageTypesByRouteName[$routeName] = $pageType; } return $this; }
protected function getLangKey(PageType $pageType) { return $this->langKey . '.' . str_replace('.', '/', $pageType->getId()); }