public function ContentLanguageSettings::onImportNew in Acquia Content Hub 8.2
Handles the importing of new ContentLanguageSettings entities.
Parameters
\Drupal\acquia_contenthub\Event\EntityImportEvent $event: The entity import event.
1 call to ContentLanguageSettings::onImportNew()
- ContentLanguageSettings::onImportUpdate in src/
EventSubscriber/ EntityImport/ ContentLanguageSettings.php - Handles the importing of existing ContentLanguageSettings entities.
File
- src/
EventSubscriber/ EntityImport/ ContentLanguageSettings.php, line 36
Class
- ContentLanguageSettings
- Handles ContentLanguageSetting entity saves to apply related schema.
Namespace
Drupal\acquia_contenthub\EventSubscriber\EntityImportCode
public function onImportNew(EntityImportEvent $event) {
$settings = $event
->getEntity();
// Early return if this isn't the class of entity we care about.
if (!$settings instanceof ContentLanguageSettingsInterface) {
return;
}
// @see \Drupal\content_translation\ContentTranslationManager::isEnabled()
if ($settings
->getThirdPartySetting('content_translation', 'enabled', FALSE)) {
$this
->processSettings($settings);
}
}