field_ui_entity_operation

function field_ui_entity_operation

field_ui_entity_operation(EntityInterface $entity)

Implements hook_entity_operation().

File

core/modules/field_ui/field_ui.module, line 140
Allows administrators to attach custom fields to fieldable types.

Code

function field_ui_entity_operation(EntityInterface $entity) {
  $operations = array();
  $info = $entity->getEntityType();
  // Add manage fields and display links if this entity type is the bundle
  // of another and that type has field UI enabled.
  if (($bundle_of = $info->getBundleOf()) && \Drupal::entityManager()->getDefinition($bu