public function index()
 {
     $model = array();
     $model['menu'] = AdminMenuEnum::LEFT_MENU("pages");
     $model['domains'] = Domain::getDomainsArray();
     $model['languageList'] = $this->pageService->getAllLanguages();
     return View::make('admin.pageadmin.index', $model);
 }
 /**
  * @param $domain
  * @throws \Transp\Service\Exceptions\InvalidDomainException
  */
 public function setDomain($domain)
 {
     if (Domain::is($domain)) {
         $this->domain = $domain;
     } else {
         throw new InvalidDomainException();
     }
 }
 /**
  * @return Page
  */
 static function findCurrentPage()
 {
     $pageService = App::make("Transp\\Service\\IPageService");
     $domain = Domain::current();
     $slug = \Request::path();
     if (strlen($slug) > 1) {
         return $pageService->findPageBySlugAndDomain($slug, $domain);
     }
     return null;
 }
 public function testGetDomain()
 {
     $this->assertEquals(Domain::DOMAINEONE, Domain::getDomain(Domain::DOMAINEONE . "/ceva/cu/altceva"));
 }