Skip to content
Snippets Groups Projects
Commit 1456b33f authored by Paul Mrvik's avatar Paul Mrvik
Browse files

Issue #3476074 by globexplorer: Mark with Entity action type in override listing

parent 8cc72376
No related branches found
No related tags found
No related merge requests found
...@@ -71,8 +71,9 @@ final class OverrideDefaultNotificationTemplate extends FormBase { ...@@ -71,8 +71,9 @@ final class OverrideDefaultNotificationTemplate extends FormBase {
->condition('notification_entity_type', $entity_type) ->condition('notification_entity_type', $entity_type)
->condition('notification_entity_bundle', $bundle) ->condition('notification_entity_bundle', $bundle)
->condition('notification_type', 'default') ->condition('notification_type', 'default')
->condition('entity_action_type', 'update') ->condition('entity_action_type', ['update','cron'], 'IN')
->condition('entity_id', '', '=') ->condition('entity_id', '', '=')
->accessCheck(FALSE)
->execute(); ->execute();
...@@ -81,8 +82,9 @@ final class OverrideDefaultNotificationTemplate extends FormBase { ...@@ -81,8 +82,9 @@ final class OverrideDefaultNotificationTemplate extends FormBase {
->condition('notification_entity_type', $entity_type) ->condition('notification_entity_type', $entity_type)
->condition('notification_entity_bundle', $bundle) ->condition('notification_entity_bundle', $bundle)
->condition('notification_type', 'override') ->condition('notification_type', 'override')
->condition('entity_action_type', 'update') ->condition('entity_action_type', ['update','cron'], 'IN')
->condition('entity_id', $entity_id, '=') ->condition('entity_id', $entity_id, '=')
->accessCheck(FALSE)
->execute(); ->execute();
$entities = \Drupal::entityTypeManager()->getStorage('conditional_notification')->loadMultiple($overriden_entity_ids); $entities = \Drupal::entityTypeManager()->getStorage('conditional_notification')->loadMultiple($overriden_entity_ids);
...@@ -98,11 +100,11 @@ final class OverrideDefaultNotificationTemplate extends FormBase { ...@@ -98,11 +100,11 @@ final class OverrideDefaultNotificationTemplate extends FormBase {
$entities = \Drupal::entityTypeManager()->getStorage('conditional_notification')->loadMultiple($entity_ids); $entities = \Drupal::entityTypeManager()->getStorage('conditional_notification')->loadMultiple($entity_ids);
if (isset($entities) && !empty($entities)) { if (isset($entities) && !empty($entities)) {
foreach ($entities as $entity) { foreach ($entities as $entity) {
$existing_default_templates[$entity->id()] = ['id' => $entity->id()]; $label = $entity->id() . ' (' . $entity->getEntityActionType() . ')';
$existing_default_templates[$entity->id()] = ['id' => $label];
} }
} }
$form['table'] = [ $form['table'] = [
'#type' => 'tableselect', '#type' => 'tableselect',
'#header' => $header, '#header' => $header,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment