getKey() public méthode

public getKey ( ) : string
Résultat string
 /**
  * @param Webspace $webspace
  * @param Portal   $portal
  */
 public function __construct(Webspace $webspace, Portal $portal)
 {
     $this->webspace = $webspace;
     $this->portal = $portal;
     $message = 'The portal "' . $portal->getKey() . '" in the webspace definition "' . $webspace->getKey() . '" ' . 'has multiple default localizations';
     parent::__construct($message, 0);
 }
 /**
  * @param Webspace $webspace
  * @param Portal   $portal
  */
 public function __construct(Webspace $webspace, Portal $portal)
 {
     $this->webspace = $webspace;
     $this->portal = $portal;
     $message = 'The portal "' . $portal->getKey() . '" in the webspace definition "' . $webspace->getKey() . '" ' . 'has not specified the required attributes (a default localization)';
     parent::__construct($message, 0);
 }
Exemple #3
0
 /**
  * Returns key of portal.
  */
 public function getPortalKey()
 {
     if (null === $this->portal) {
         return;
     }
     return $this->portal->getKey();
 }
Exemple #4
0
 /**
  * {@inheritdoc}
  */
 public function renderSitemap($alias, $page, $locale, Portal $portal, $host, $scheme)
 {
     if (!$this->sitemapProviderPool->hasProvider($alias)) {
         return;
     }
     $provider = $this->sitemapProviderPool->getProvider($alias);
     if ($provider->getMaxPage() < $page) {
         return;
     }
     $entries = $provider->build($page, $portal->getKey(), $locale);
     return $this->render('SuluWebsiteBundle:Sitemap:sitemap.xml.twig', ['webspaceKey' => $portal->getWebspace()->getKey(), 'locale' => $locale, 'defaultLocale' => $portal->getXDefaultLocalization()->getLocale(), 'domain' => $host, 'scheme' => $scheme, 'entries' => $entries]);
 }
 public function __construct(Portal $portal, $environment)
 {
     parent::__construct(sprintf('The environment "%s" could not be found in the portal "%s".', $environment, $portal->getKey()));
     $this->portal = $portal;
     $this->environment = $environment;
 }
 public function __construct(Portal $portal, $locale)
 {
     parent::__construct(sprintf('The locale "%s" could not be found in the portal "%s".', $locale, $portal->getKey()));
     $this->portal = $portal;
     $this->locale = $locale;
 }