function lightning_workflow_entity_view_alter in Lightning Workflow 8
Same name and namespace in other branches
- 8.3 lightning_workflow.module \lightning_workflow_entity_view_alter()
- 8.2 lightning_workflow.module \lightning_workflow_entity_view_alter()
Implements hook_entity_view_alter().
File
- ./
lightning_workflow.module, line 102 - Provides workflow enhancements for Drupal.
Code
function lightning_workflow_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
if (\Drupal::moduleHandler()
->moduleExists('quickedit')) {
quickedit_entity_view_alter($build, $entity, $display);
if ($entity instanceof EntityPublishedInterface && $entity
->isPublished() && RouteSubscriber::isViewing($entity)) {
unset($build['#attributes']['data-quickedit-entity-id']);
}
}
}