function commerce_order_entity_operation_alter in Commerce Core 8.2
Implements hook_entity_operation_alter().
Hides the "Storage settings" operation for the profile "address" field.
File
- modules/
order/ commerce_order.module, line 379 - Defines the Order entity and associated features.
Code
function commerce_order_entity_operation_alter(array &$operations, EntityInterface $entity) {
if ($entity
->getEntityTypeId() == 'field_config') {
/** @var \Drupal\Core\Field\FieldConfigInterface $entity */
if ($entity
->getTargetEntityTypeId() == 'profile' && $entity
->getName() == 'address') {
unset($operations['storage-settings']);
}
}
}