Answers for "drupal 8 preprocess field"

-1

drupal 8 preprocess field

/**
 * Implement hook_preprocess_field().
 */
function MY_MODULE_preprocess_field(&$variables) {
  if (!empty($variables['field_name'])) {
    switch ($variables['field_name']) {
      case 'created':

        break;
    }
  }
}
Posted by: Guest on November-04-2020

Browse Popular Code Answers by Language