->
getTargetStorage() ->
read($unprocessed_configuration);
$diff =
array_diff_key($workflow_config['type_settings'
]['states'
],
$original_workflow_config['type_settings'
]['states'
]);
foreach (array_keys($diff) as $state_id) { $state =
$workflow->
getTypePlugin()->
getState($state_id);
if ($workflow->
getTypePlugin()->
workflowStateHasData($workflow,
$state)) { $event->
getConfigImporter()->
logError($this->
t('The moderation state @state_label is being used, but is not in the source storage.',
['@state_label' =>
$state->
label()]));
} } } if ($op === 'delete'
) { if ($workflow->
getTypePlugin()->
workflowHasData($workflow)) { $event->
getConfigImporter()->
logError($this->
t('The workflow @workflow_label is being used, and cannot be deleted.',
['@workflow_label' =>
$workflow->
label()]));
} } } } } } /**
* Get the workflow entity object from the configuration name.
*
* @param string $config_name
* The configuration object name.
*
* @return \Drupal\workflows\WorkflowInterface|null
* A workflow entity object. NULL if no matching entity is found.
*/