| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | function df_tools_page_modules_installed(array $modules) { |
||
| 9 | if (Drupal::isConfigSyncing()) { |
||
| 10 | return; |
||
| 11 | } |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Add Basic Page to editorial workflow. |
||
| 15 | * Correct changes to Lightning 3.1.5 |
||
| 16 | * https://www.drupal.org/node/2984737 |
||
| 17 | */ |
||
| 18 | |||
| 19 | if (in_array('df_tools_workflow', $modules, TRUE)) { |
||
| 20 | $workflow = Workflow::load('editorial'); |
||
| 21 | /** @var \Drupal\content_moderation\Plugin\WorkflowType\ContentModerationInterface $plugin */ |
||
| 22 | $plugin = $workflow->getTypePlugin(); |
||
| 23 | $plugin->addEntityTypeAndBundle('node', 'page'); |
||
| 24 | $workflow->save(); |
||
| 25 | } |
||
| 26 | } |