You are here

public function RestfulDataProviderDbQuery::getUniqueId in RESTful 7

Returns a unique id for a table record.

Parameters

object $row: The database record.

Return value

string The ID

1 call to RestfulDataProviderDbQuery::getUniqueId()
RestfulDataProviderDbQuery::mapDbRowToPublicFields in plugins/restful/RestfulDataProviderDbQuery.php
Prepares the output array from the database row object.

File

plugins/restful/RestfulDataProviderDbQuery.php, line 588
Contains \RestfulDataProviderDbQuery

Class

RestfulDataProviderDbQuery
@file Contains \RestfulDataProviderDbQuery

Code

public function getUniqueId($row) {
  $keys = array(
    $this
      ->getTableName(),
  );
  foreach ($this
    ->getIdColumn() as $column) {
    $keys[] = $row->{$column};
  }
  return implode(self::COLUMN_IDS_SEPARATOR, $keys);
}