Sulu\Component\Content\ContentTypeManager::get PHP Method

get() public method

public get ( $alias )
    public function get($alias)
    {
        if (!isset($this->aliasServiceIdMap[$alias])) {
            throw new \InvalidArgumentException(sprintf('Content type with alias "%s" has not been registered. Known content types are: "%s"', $alias, implode('", "', array_keys($this->aliasServiceIdMap))));
        }
        $serviceId = $this->aliasServiceIdMap[$alias];
        return $this->container->get($serviceId);
    }

Usage Example

Ejemplo n.º 1
0
 private function getReferencedUuids(PropertyInterface $property)
 {
     $contentTypeName = $property->getContentTypeName();
     $contentType = $this->contentTypeManager->get($contentTypeName);
     $referencedUuids = $contentType->getReferencedUuids($property);
     return $referencedUuids;
 }
All Usage Examples Of Sulu\Component\Content\ContentTypeManager::get