getDomain(); if (null === $domain) { continue; } $firstDomain = $domain->get(0); if (null === $firstDomain) { continue; } $type = $firstDomain->getUri(); /** @noinspection PhpParamsInspection */ $parentClasses = $this->getParentClasses($firstDomain); /** @var core_kernel_classes_Property $propertyType */ $propertyType = $this->getPropertyType($property); if (null === $propertyType) { continue; } $indexProperties[] = [ 'type' => $type, 'parentClasses' => $parentClasses, 'oldName' => $this->getPropertyRealName($propertyData['oldLabel'], $propertyData['oldPropertyType']), 'newName' => $this->getPropertyRealName($property->getLabel(), $propertyType->getUri()) ]; } $this->logInfo('Indexing properties'); try { /** @var IndexUpdaterInterface $indexUpdater */ $indexUpdater = $this->getServiceLocator()->get(IndexUpdaterInterface::SERVICE_ID); $indexUpdater->updatePropertiesName($indexProperties); } catch (Throwable $exception) { $message = 'Failed during update search index'; $this->logError($message); return common_report_Report::createFailure(__($message)); } $message = 'Search index was successfully updated.'; $this->logInfo($message); return common_report_Report::createSuccess(__($message)); } }