function OliveroHooks::preprocessFieldNodeCreated

Same name and namespace in other branches
  1. main core/themes/olivero/src/Hook/OliveroHooks.php \Drupal\olivero\Hook\OliveroHooks::preprocessFieldNodeCreated()

Implements hook_preprocess_HOOK().

Attributes

#[Hook('preprocess_field__node__created')]

File

core/themes/olivero/src/Hook/OliveroHooks.php, line 468

Class

OliveroHooks
Hook implementations for olivero.

Namespace

Drupal\olivero\Hook

Code

public function preprocessFieldNodeCreated(&$variables) : void {
  foreach (Element::children($variables['items']) as $item) {
    unset($variables['items'][$item]['content']['#prefix']);
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.