/** * @inheritdoc */ public function mergeExistingItems($originalItem, $newItem) { $originalItem = parent::mergeExistingItems($originalItem, $newItem); $originalItem->models = array_unique(array_merge($originalItem->models, $newItem->models)); $originalItem->modules = array_unique(array_merge($originalItem->modules, $newItem->modules)); if ($newItem->systemVersion > $originalItem->systemVersion) { if ($this->initializeTaxonomies($originalItem->object, $newItem->initialTaxonomies)) { $originalItem->object->systemVersion = $newItem->systemVersion; $originalItem->object->save(true, ['systemVersion']); } } return $originalItem; }
/** * @inheritdoc */ public function register($owner, $itemComponent, $systemId = null) { $item = parent::register($owner, $itemComponent, $systemId); $this->_lastLoadedTheme = $item; return $item; }