62 $this->
namespace = $component->getContext()->getNamespace();
64 $this->component->
getContext()->addComponentDefinition(
65 $this->
getConfig(self::CONFIG_COMPONENT_NAME),
67 'component' => $this->
getConfig(self::CONFIG_JS_COMPONENT),
68 'extends' => $this->
namespace 77 'types' => $context->getComponentsDefinitions(),
79 $context->getNamespace() => [
80 'children' => array_merge(
$children, $dataSources)
95 protected function addChildren(
101 $childComponents =
$component->getChildComponents();
102 if (!empty($childComponents)) {
104 foreach ($childComponents as $child) {
108 if ($child->getData(
'wrapper')) {
112 self::addChildren($childrenNode, $child, $child->getComponentName());
121 'type' => $componentType,
124 if (!empty($childrenNode)) {
125 $nodeData[
'children'] = $childrenNode;
127 if (isset(
$config[
'dataScope'])) {
128 $nodeData[
'dataScope'] =
$config[
'dataScope'];
147 if (!($childComponent->
getData(
'wrapper/canShow') && $childComponent->
getData(
'wrapper/componentType'))) {
153 $childrenNode[
$name] = [
154 'type' => $panelComponent->getComponentName(),
155 'dataScope' =>
$name,
160 'dataScope' =>
$name,
162 'content' => $childComponent->
render()
181 $panelComponent = $this->uiComponentFactory->create(
183 $childComponent->
getData(
'wrapper/componentType'),
185 'context' => $this->component->getContext(),
186 'components' => [$childComponent->
getName() => $childComponent]
189 $panelComponent->prepare();
190 $this->component->addComponent(
$name, $panelComponent);
192 return $panelComponent;
203 return $this->data[
'config'][
$name] ??
null;
getData($key='', $index=null)
const CONFIG_COMPONENT_NAME
createChildFormComponent(UiComponentInterface $childComponent, $name)
build(UiComponentInterface $component)
addWrappedBlock(BlockWrapperInterface $childComponent, array &$childrenNode)
const CONFIG_PANEL_COMPONENT
const CONFIG_JS_COMPONENT
__construct(UiComponentFactory $uiComponentFactory, $data=[])
if(!isset($_GET['name'])) $name