You are here

public static function RestfulEntityBase::propertyIsField in RESTful 7

Checks if a given string represents a Field API field.

Parameters

string $name: The name of the field/property.

Return value

bool TRUE if it's a field. FALSE otherwise.

2 calls to RestfulEntityBase::propertyIsField()
RestfulEntityBase::getEntityIdByFieldId in plugins/restful/RestfulEntityBase.php
Get the entity ID based on the ID provided in the request.
RestfulEntityBase::getValueFromFieldFormatter in plugins/restful/RestfulEntityBase.php
Get value from a field rendered by Drupal field API's formatter.

File

plugins/restful/RestfulEntityBase.php, line 1591
Contains RestfulEntityBase.

Class

RestfulEntityBase
An abstract implementation of RestfulEntityInterface.

Code

public static function propertyIsField($name) {
  $field_info = field_info_field($name);
  return !empty($field_info);
}