Esempio n. 1
0
 /**
  * @param $page_type
  * @return mixed
  * @throws HomePageAlreadyExists
  */
 public function createHomePage($page_type)
 {
     $home = $this->getHomePage();
     if ($home) {
         throw new HomePageAlreadyExists('Home Page has already been created.');
     }
     $type = $this->callModuleMethod('getHomePageType', [$page_type]);
     return $this->repository->createHome($type, $this->getCurrentUserId());
 }