Sulu\Bundle\SnippetBundle\Snippet\DefaultSnippetManagerInterface::loadIdentifier PHP Method

loadIdentifier() public method

Loads identifier for given type.
public loadIdentifier ( string $webspaceKey, string $type ) : string
$webspaceKey string
$type string
return string
    public function loadIdentifier($webspaceKey, $type);

Usage Example

コード例 #1
0
 public function getDefault($snippetType, $webspaceKey = null, $locale = null)
 {
     if (!$webspaceKey) {
         $webspaceKey = $this->requestAnalyzer->getWebspace()->getKey();
     }
     if (!$locale) {
         $locale = $this->requestAnalyzer->getCurrentLocalization()->getLocalization();
     }
     $ids = [$this->defaultSnippetManager->loadIdentifier($webspaceKey, $snippetType)];
     // to filter null default snippet
     $ids = array_filter($ids);
     return $this->snippetResolver->resolve($ids, $webspaceKey, $locale);
 }
All Usage Examples Of Sulu\Bundle\SnippetBundle\Snippet\DefaultSnippetManagerInterface::loadIdentifier