public ContentEntityBase::get($field_name)
Gets a field item list.
string $field_name: The name of the field to get; e.g., 'title' or 'name'.
\Drupal\Core\Field\FieldItemListInterface The field item list, containing the field items.
\InvalidArgumentException If an invalid field name is given.
Overrides FieldableEntityInterface::get
public function get($field_name) { if (!isset($this->fields[$field_name][$this->activeLangcode])) { return $this->getTranslatedField($field_name, $this->activeLangcode); } return $this->fields[$field_name][$this->activeLangcode]; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!ContentEntityBase.php/function/ContentEntityBase::get/8.1.x