Commit 5b12aefe authored by Albert Skibinski's avatar Albert Skibinski Committed by Sean Blommaert
Browse files

Issue #3324787: Update 4.x branch

parent 2ce3de2c
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -5,8 +5,6 @@
 * Install, update and uninstall functions for entity_usage module.
 */

use Drupal\Core\Url;
use Drupal\Core\Site\Settings;
use Drupal\entity_usage\Controller\ListUsageController;

/**
+9 −9
Original line number Diff line number Diff line
@@ -6,10 +6,8 @@
 */

use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
use Drupal\entity_usage\EntityUsageBackgroundTracking;
use Drupal\field\FieldStorageConfigInterface;

/**
@@ -67,12 +65,14 @@ function entity_usage_form_alter(&$form, FormStateInterface $form_state, $form_i
    $form['entity_usage_edit_warning'] = [
      '#theme' => 'status_messages',
      '#message_list' => [
        'warning' => [t('Modifications on this form will affect all <a href="@usage_url" target="_blank">existing usages</a> of this entity.', [
        'warning' => [
          t('Modifications on this form will affect all <a href="@usage_url" target="_blank">existing usages</a> of this entity.', [
            '@usage_url' => Url::fromRoute('entity_usage.usage_list', [
              'entity_type' => $entity->getEntityTypeId(),
              'entity_id' => $entity->id(),
            ])->toString(),
        ])],
          ]),
        ],
      ],
      '#status_headings' => ['warning' => t('Warning message')],
      '#weight' => -201,
@@ -100,7 +100,7 @@ function entity_usage_form_alter(&$form, FormStateInterface $form_state, $form_i
                'entity_type' => $entity->getEntityTypeId(),
                'entity_id' => $entity->id(),
              ])->toString(),
            ])
            ]),
          ],
        ],
        '#status_headings' => ['warning' => t('Warning message')],
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

/**
 * @file
 * hook_post_update_NAME functions for entity_usage module.
 * Hook_post_update_NAME functions for entity_usage module.
 */

/**
+4 −0
Original line number Diff line number Diff line
@@ -9,3 +9,7 @@ services:
    arguments: ['@entity_type.manager', '@config.factory']
    tags:
      - { name: event_subscriber }
  entity_usage.entity_track_purge_subscriber:
    class: Drupal\entity_usage\EventSubscriber\EntityTrackPurgeSubscriber
    tags:
      - { name: event_subscriber }
+2 −3
Original line number Diff line number Diff line
@@ -11,10 +11,9 @@ use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\RevisionableInterface;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Link;
use Drupal\Core\Pager\PagerManagerInterface;
use Drupal\entity_usage\EntityUsageInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Pager\PagerManagerInterface;

/**
 * Controller for our pages.
Loading