Created
June 29, 2016 10:24
-
-
Save zuhairkareem/3d5ca244c20617a39d0ac9a8a5c19111 to your computer and use it in GitHub Desktop.
Get field data from entity in D8
This file contains 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
$entity_st = \Drupal::entityManager()->getStorage('entity_name'); | |
$entity_obj = $entity_st->load(entity_id); | |
$field_value = $entity_obj->get('field_name')->value; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment