public static function getValues(Entity $entityObject, $field_name, $post_process = FALSE) { $field = $entityObject->getFieldItems($field_name); return $field; }
public static function getFileGenericValues(Entity $entityObject, $field_name, $post_process = FALSE) { $field = $entityObject->getFieldItems($field_name); if (!$post_process) { return $field; } $output = array(); foreach ($field as $fid => $file) { $output[] = $fid; } return Utils::normalize($output); }