You are here

protected function EntityPagerSetup::setIdFieldName in Entity Pager 7

Set Field Name of ID field.

Work out and store the field 'id' that is to be used. This is set in the out Settings object.

Return value

text Get the ID field name, that has just been set in the outSettings object.

1 call to EntityPagerSetup::setIdFieldName()
EntityPagerSetup::establishEntity in includes/EntityPagerSetup.inc
Establish Entity.

File

includes/EntityPagerSetup.inc, line 295
General setup base Class for Entity Pager module.

Class

EntityPagerSetup
Class EntityPagerSetup.

Code

protected function setIdFieldName() {
  if (isset($this->entityInfo['alias'])) {
    $field_name = $this->entityInfo['alias'];
  }
  else {
    $field_name = $this->entityInfo['field'];
  }
  $this->outSettings->id_field_name = $field_name;
  return $this->outSettings->id_field_name;
}