Esempio n. 1
0
 /**
  * To create the raw  data components
  *
  * @param string $component
  * @return array
  */
 public function createRawComponentData($component)
 {
     $componentData = $this->componentConfigProvider->getComponentData($component);
     $componentData[Converter::DATA_ATTRIBUTES_KEY] = isset($componentData[Converter::DATA_ATTRIBUTES_KEY]) ? $componentData[Converter::DATA_ATTRIBUTES_KEY] : [];
     $componentData[Converter::DATA_ARGUMENTS_KEY] = isset($componentData[Converter::DATA_ARGUMENTS_KEY]) ? $componentData[Converter::DATA_ARGUMENTS_KEY] : [];
     return [ManagerInterface::COMPONENT_ATTRIBUTES_KEY => $componentData[Converter::DATA_ATTRIBUTES_KEY], ManagerInterface::COMPONENT_ARGUMENTS_KEY => $componentData[Converter::DATA_ARGUMENTS_KEY]];
 }
Esempio n. 2
0
 /**
  * To create the raw  data components
  *
  * @param string $component
  * @param bool $evaluated
  * @return array
  */
 public function createRawComponentData($component, $evaluated = true)
 {
     $componentData = $this->componentConfigProvider->getComponentData($component);
     $componentData[Converter::DATA_ATTRIBUTES_KEY] = isset($componentData[Converter::DATA_ATTRIBUTES_KEY]) ? $componentData[Converter::DATA_ATTRIBUTES_KEY] : [];
     $componentData[Converter::DATA_ARGUMENTS_KEY] = isset($componentData[Converter::DATA_ARGUMENTS_KEY]) ? $componentData[Converter::DATA_ARGUMENTS_KEY] : [];
     if ($evaluated) {
         foreach ($componentData[Converter::DATA_ARGUMENTS_KEY] as $argumentName => $argument) {
             $componentData[Converter::DATA_ARGUMENTS_KEY][$argumentName] = $this->argumentInterpreter->evaluate($argument);
         }
     }
     return [ManagerInterface::COMPONENT_ATTRIBUTES_KEY => $componentData[Converter::DATA_ATTRIBUTES_KEY], ManagerInterface::COMPONENT_ARGUMENTS_KEY => $componentData[Converter::DATA_ARGUMENTS_KEY]];
 }