You are here

entity_test_operation.module in Zircon Profile 8

Contains hook implementations for Entity Operation Test Module.

File

core/modules/system/tests/modules/entity_test_operation/entity_test_operation.module
View source
<?php

/**
 * @file
 * Contains hook implementations for Entity Operation Test Module.
 */
use Drupal\Core\Url;

/**
 * Implements hook_entity_operation().
 */
function entity_test_operation_entity_operation(\Drupal\Core\Entity\EntityInterface $entity) {
  return [
    'test' => [
      'title' => t('Front page'),
      'url' => Url::fromRoute('<front>'),
      'weight' => 0,
    ],
  ];
}