Sulu\Component\Content\Compat\StructureManagerInterface::getStructure PHP Méthode

getStructure() public méthode

Returns structure for given key and type.
public getStructure ( string $key, string $type = Structure::TYPE_PAGE ) : Sulu\Component\Content\Compat\StructureInterface
$key string
$type string
Résultat Sulu\Component\Content\Compat\StructureInterface
    public function getStructure($key, $type = Structure::TYPE_PAGE);

Usage Example

 /**
  * {@inheritdoc}
  */
 public function generate($parts, $parentUuid, $webspaceKey, $languageCode, $templateKey, $segmentKey = null)
 {
     /** @var StructureInterface $structure */
     $structure = $this->structureManager->getStructure($templateKey);
     $title = $this->implodeRlpParts($structure, $parts);
     $resourceLocatorStrategy = $this->resourceLocatorStrategyPool->getStrategyByWebspaceKey($webspaceKey);
     $resourceLocator = $resourceLocatorStrategy->generate($title, $parentUuid, $webspaceKey, $languageCode, $segmentKey);
     return ['resourceLocator' => $resourceLocator, '_links' => ['self' => $this->getBasePath() . '/generates']];
 }
All Usage Examples Of Sulu\Component\Content\Compat\StructureManagerInterface::getStructure