25 self::TYPE_LAYOUT => \Magento\Framework\View\Layout\Builder::class,
26 self::TYPE_PAGE => \Magento\Framework\View\Page\Builder::class,
57 if (isset($typeInfo[
'type']) && isset($typeInfo[
'class'])) {
58 $this->typeMap[$typeInfo[
'type']] = $typeInfo[
'class'];
73 if (empty($this->typeMap[
$type])) {
74 throw new \InvalidArgumentException(
'"' .
$type .
': isn\'t allowed');
77 $builderInstance = $this->objectManager->create($this->typeMap[
$type],
$arguments);
79 throw new \InvalidArgumentException(get_class($builderInstance) .
' isn\'t instance of BuilderInterface');
81 return $builderInstance;
__construct(ObjectManagerInterface $objectManager, array $typeMap=[])
create($type, array $arguments)
mergeTypes(array $typeMap)