You are here

ds_devel.module in Display Suite 8.4

Display Suite devel integration.

File

modules/ds_devel/ds_devel.module
View source
<?php

/**
 * @file
 * Display Suite devel integration.
 */

/**
 * Implements hook_entity_type_alter().
 */
function ds_devel_entity_type_alter(array &$entity_types) {

  /* @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
  foreach ($entity_types as $entity_type_id => $entity_type) {
    if ($entity_type
      ->hasViewBuilderClass() && $entity_type
      ->hasLinkTemplate('canonical')) {
      $entity_type
        ->setLinkTemplate('devel-markup', $entity_type
        ->getLinkTemplate('canonical') . '/devel/markup');
    }
  }
}

Functions