entity_test_operation.module

Same filename in other branches
  1. 8.9.x core/modules/system/tests/modules/entity_test_operation/entity_test_operation.module
  2. 10 core/modules/system/tests/modules/entity_test_operation/entity_test_operation.module
  3. 11.x core/modules/system/tests/modules/entity_test_operation/entity_test_operation.module

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\Entity\EntityInterface;
use Drupal\Core\Url;

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

Functions

Title Deprecated Summary
entity_test_operation_entity_operation Implements hook_entity_operation().

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.