You are here

public function EntityPagerSetup::getEntityInfo in Entity Pager 7

Get Entity Information.

Get generic information about the Entity Type. If no field is declared it will return the complete array of Entity Information. If a $field is entered only information on that field is returned.

Parameters

string|null $field: Either leave as null for the whole object or specify an individual field.

Return value

bool|object $entityInfo Get the Entity Info object.

2 calls to EntityPagerSetup::getEntityInfo()
EntityPagerOut::calculateNextAllPrevValuesFromView in includes/EntityPagerOut.inc
Calculate the values for the links.
EntityPagerOut::getEntityPager in includes/EntityPagerOut.inc
Entity Pager return links.

File

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

Class

EntityPagerSetup
Class EntityPagerSetup.

Code

public function getEntityInfo($field = NULL) {
  $entity_info = FALSE;
  if (is_null($field)) {

    // The whole array.
    $entity_info = $this->entityInfo;
  }
  elseif (isset($this->entityInfo[$field])) {

    // A specific field.
    $entity_info = $this->entityInfo[$field];
  }
  return $entity_info;
}