class EntityTestOperationHooks

Hook implementations for entity_test_operation.

Hierarchy

Expanded class hierarchy of EntityTestOperationHooks

File

core/modules/system/tests/modules/entity_test_operation/src/Hook/EntityTestOperationHooks.php, line 14

Namespace

Drupal\entity_test_operation\Hook
View source
class EntityTestOperationHooks {
    
    /**
     * Implements hook_entity_operation().
     */
    public function entityOperation(EntityInterface $entity) {
        return [
            'test' => [
                'title' => t('Front page'),
                'url' => Url::fromRoute('<front>'),
                'weight' => 0,
            ],
        ];
    }

}

Members

Title Sort descending Modifiers Object type Summary
EntityTestOperationHooks::entityOperation public function Implements hook_entity_operation().

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