You are here

public static function FieldHelper::readInstanceByID in Helper 7

File

lib/FieldHelper.php, line 184

Class

FieldHelper

Code

public static function readInstanceByID($id, $include_deleted = TRUE, $include_inactive = TRUE) {
  $fields = field_read_instances(array(
    'id' => $id,
  ), array(
    'include_deleted' => $include_deleted,
    'include_inactive' => $include_inactive,
  ));
  return !empty($fields) ? reset($fields) : FALSE;
}