You are here

function quantity_theme_suggestions_field in farmOS 2.x

Implements hook_theme_suggestions_HOOK().

File

modules/core/quantity/quantity.module, line 168
Quantity module.

Code

function quantity_theme_suggestions_field(array $variables) {
  $suggestions = [];

  // Add a theme hook suggestion for theming all fields on quantity entities.
  // Note that the field__quantity theme hook is used for any entity with
  // a field called "quantity", such as the log.quantity entity reference.
  if ($variables['element']['#entity_type'] == 'quantity') {
    $suggestions[] = 'field__quantity__field';
  }
  return $suggestions;
}