public function Flow::resetVersionWarning in CMS Content Sync 2.1.x
Same name and namespace in other branches
- 8 src/Entity/Flow.php \Drupal\cms_content_sync\Entity\Flow::resetVersionWarning()
- 2.0.x src/Entity/Flow.php \Drupal\cms_content_sync\Entity\Flow::resetVersionWarning()
Unset the flow version warning.
File
- src/
Entity/ Flow.php, line 452
Class
- Flow
- Defines the "Content Sync - Flow" entity.
Namespace
Drupal\cms_content_sync\EntityCode
public function resetVersionWarning() {
$moduleHandler = \Drupal::service('module_handler');
if ($moduleHandler
->moduleExists('cms_content_sync_developer')) {
$developer_config = \Drupal::service('config.factory')
->getEditable('cms_content_sync.developer');
$mismatching_versions = $developer_config
->get('version_mismatch');
if (!empty($mismatching_versions)) {
unset($mismatching_versions[$this
->id()]);
$developer_config
->set('version_mismatch', $mismatching_versions)
->save();
}
}
}