You are here

protected function EntityDefaultUIController::operationCount in Entity API 7

Returns the operation count for calculating colspans.

2 calls to EntityDefaultUIController::operationCount()
EntityDefaultUIController::overviewTableHeaders in includes/entity.ui.inc
Generates the table headers for the overview table.
EntityDefaultUIController::overviewTableRow in includes/entity.ui.inc
Generates the row for the passed entity and may be overridden in order to customize the rows.

File

includes/entity.ui.inc, line 256
Provides a controller for building an entity overview form.

Class

EntityDefaultUIController
Default UI controller providing admin UI.

Code

protected function operationCount() {
  $count = 3;
  $count += !empty($this->entityInfo['bundle of']) && entity_type_is_fieldable($this->entityInfo['bundle of']) && module_exists('field_ui') ? 2 : 0;
  $count += !empty($this->entityInfo['exportable']) ? 1 : 0;
  $count += !empty($this->entityInfo['i18n controller class']) ? 1 : 0;
  return $count;
}