Exemplo n.º 1
0
 /**
  * Get "copy code" for module data.
  *
  * @param ModuleData $moduleData
  * @return array
  */
 public static function getModuleDataCode(ModuleData $moduleData)
 {
     return array("inherited" => true, "template" => $moduleData->getTemplate(), "enabled" => $moduleData->getEnabled(), "data" => $moduleData->getData(), "langcode" => $moduleData->getLangcode());
 }
Exemplo n.º 2
0
 /**
  * Internal function to add a ModuleData object.
  *
  * @param ModuleData $moduleData
  */
 protected function addData(ModuleData $moduleData)
 {
     if ($moduleData->getTemplate() !== NULL) {
         $this->template = $moduleData->getTemplate();
         $this->templateSourceId = $moduleData->getModuleDataId();
     }
     if ($moduleData->getEnabled() !== NULL) {
         $this->enabled = $moduleData->getEnabled();
         $this->enabledSourceId = $moduleData->getModuleDataId();
     }
     if ($moduleData->getData() !== NULL) {
         $this->data = $moduleData->getData();
         $this->dataSourceId = $moduleData->getModuleDataId();
     }
 }