Пример #1
0
 /**
  * Returns the list of URL aliases for a location
  *
  * @param $locationPath
  *
  * @return \eZ\Publish\Core\REST\Server\Values\URLAliasRefList
  */
 public function listLocationURLAliases($locationPath)
 {
     $locationPathParts = explode('/', $locationPath);
     $location = $this->locationService->loadLocation(array_pop($locationPathParts));
     $custom = $this->request->query->has('custom') && $this->request->query->get('custom') === 'false' ? false : true;
     return new Values\CachedValue(new Values\URLAliasRefList($this->urlAliasService->listLocationAliases($location, $custom), $this->request->getPathInfo()), array('locationId' => $location->id));
 }
Пример #2
0
 /**
  * List of url aliases pointing to $location, sorted by language priority.
  *
  * @param \eZ\Publish\API\Repository\Values\Content\Location $location
  * @param boolean $custom if true the user generated aliases are listed otherwise the autogenerated
  * @param string $languageCode filters those which are valid for the given language
  * @param null|boolean $showAllTranslations
  * @param null|string[] $prioritizedLanguageList
  *
  * @return \eZ\Publish\API\Repository\Values\Content\URLAlias[]
  */
 public function listLocationAliases(Location $location, $custom = true, $languageCode = null, $showAllTranslations = null, array $prioritizedLanguageList = null)
 {
     return $this->service->listLocationAliases($location, $custom, $languageCode, $showAllTranslations, $prioritizedLanguageList);
 }