You are here

protected function RestfulDataProviderEFQ::getColumnFromProperty in RESTful 7

Get the DB column name from a property.

The "property" defined in the public field is actually the property of the entity metadata wrapper. Sometimes that property can be a different name than the column in the DB. For example, for nodes the "uid" property is mapped in entity metadata wrapper as "author", so we make sure to get the real column name.

Parameters

string $property_name: The property name.

Return value

string The column name.

2 calls to RestfulDataProviderEFQ::getColumnFromProperty()
RestfulDataProviderEFQ::queryForListFilter in plugins/restful/RestfulDataProviderEFQ.php
Filter the query for list.
RestfulDataProviderEFQ::queryForListSort in plugins/restful/RestfulDataProviderEFQ.php
Sort the query for list.

File

plugins/restful/RestfulDataProviderEFQ.php, line 230
Contains \RestfulDataProviderEFQ

Class

RestfulDataProviderEFQ
@file Contains \RestfulDataProviderEFQ

Code

protected function getColumnFromProperty($property_name) {
  $property_info = entity_get_property_info($this
    ->getEntityType());
  return $property_info['properties'][$property_name]['schema field'];
}