34 const CACHE_ID =
'ui_component_configuration_data';
129 $this->componentsData = $this->arrayObjectFactory->create();
144 return (array) $this->componentsData->offsetGet(
$name);
155 return $this->componentsData->offsetExists(
$name);
170 'The "%1" UI component element name is invalid. Verify the name and try again.',
175 $this->componentsPool = $this->arrayObjectFactory->create();
177 $cacheID = static::CACHE_ID .
'_' .
$name;
178 $cachedPool = $this->cache->load($cacheID);
179 if ($cachedPool ===
false) {
182 $this->serializer->serialize($this->componentsPool->getArrayCopy()),
186 $this->componentsPool->exchangeArray(
187 $this->serializer->unserialize($cachedPool)
190 $this->componentsData->offsetSet(
$name, $this->componentsPool);
204 foreach ($components as &$component) {
207 = $this->argumentInterpreter->evaluate($argument);
226 $componentData = $this->componentConfigProvider->getComponentData($component);
236 = $this->argumentInterpreter->evaluate($argument);
254 if (!isset($this->uiReader[
$name])) {
255 $this->domMerger->unsetDom();
256 $this->uiReader[
$name] = $this->readerFactory->create(
258 'fileCollector' => $this->aggregatedFileCollectorFactory->create(
266 return $this->uiReader[
$name];
297 $createdComponents = [];
299 foreach ($componentsPool as $key => $component) {
314 foreach ($component as $subComponentName => $subComponent) {
315 if (is_array($subComponent)) {
322 $createdComponents[$instanceName] = $resultConfiguration;
325 return $createdComponents;
347 protected function mergeArguments(array $componentData, array $rootComponentData)
356 return array_replace_recursive($baseArguments, $componentArguments);
374 unset($componentAttributes[
'noNamespaceSchemaLocation']);
376 return array_replace_recursive($baseAttributes, $componentAttributes);
387 protected function createName(array $componentData, $key, $componentName)
__construct(ComponentDefinition $componentConfigProvider, DomMergerInterface $domMerger, ReaderFactory $readerFactory, ArrayObjectFactory $arrayObjectFactory, AggregatedFileCollectorFactory $aggregatedFileCollectorFactory, CacheInterface $cache, InterpreterInterface $argumentInterpreter, SerializerInterface $serializer=null)
const DATA_ATTRIBUTES_KEY
createName(array $componentData, $key, $componentName)
const COMPONENT_ARGUMENTS_KEY
createDataForComponent($name, array $componentsPool)
const COMPONENT_ATTRIBUTES_KEY
mergeAttributes(array $componentData, array $rootComponentData)
evaluateComponentArguments($components)
$aggregatedFileCollectorFactory
mergeArguments(array $componentData, array $rootComponentData)
addComponentIntoPool($instanceName, array $configuration)
createRawComponentData($component, $evaluated=true)
if(!isset($_GET['name'])) $name