Created
September 8, 2017 10:41
-
-
Save suresh-kumara-gist/e21ffd37064a7f4f1a07e136ca22de2a to your computer and use it in GitHub Desktop.
preprocess paragraph entity drupal 8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function hook_preprocess_paragraph(&$variables) { | |
| //kint($variables['content']['field_class_label'][0]['#text']); die(); | |
| if ($variables['content']['field_class_label']['#items']) { | |
| $variables['content']['field_class_label'][0]['#text'] = $variables['content']['field_class_label']['#items']->getString(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment