protected function RestfulDataProviderDbQuery::getPropertyColumnForQuery in RESTful 7
Return the column name that should be used for query.
As MySql prevents using the column alias on WHERE or ORDER BY, we give implementers a chance to explicitly define the real coloumn for the query.
Parameters
$public_field_name: The public field name.
Return value
string The column name.
2 calls to RestfulDataProviderDbQuery::getPropertyColumnForQuery()
- RestfulDataProviderDbQuery::queryForListFilter in plugins/
restful/ RestfulDataProviderDbQuery.php - Filter the query for list.
- RestfulDataProviderDbQuery::queryForListSort in plugins/
restful/ RestfulDataProviderDbQuery.php - Sort the query for list.
File
- plugins/
restful/ RestfulDataProviderDbQuery.php, line 253 - Contains \RestfulDataProviderDbQuery
Class
- RestfulDataProviderDbQuery
- @file Contains \RestfulDataProviderDbQuery
Code
protected function getPropertyColumnForQuery($public_field_name) {
$public_fields = $this
->getPublicFields();
return !empty($public_fields[$public_field_name['property']]['column_for_query']) ? $public_fields[$public_field_name['property']]['column_for_query'] : $public_field_name['property'];
}