You are here

public function EntityInlineEntityFormController::defaultLabels in Inline Entity Form 7

Returns the default entity type labels.

2 calls to EntityInlineEntityFormController::defaultLabels()
EntityInlineEntityFormController::defaultSettings in includes/entity.inline_entity_form.inc
Returns an array of default settings in the form of key => value.
EntityInlineEntityFormController::labels in includes/entity.inline_entity_form.inc
Returns an array of entity type labels fit for display in the UI.
2 methods override EntityInlineEntityFormController::defaultLabels()
NodeInlineEntityFormController::defaultLabels in includes/node.inline_entity_form.inc
Overrides EntityInlineEntityFormController::defaultLabels().
TaxonomyTermInlineEntityFormController::defaultLabels in includes/taxonomy_term.inline_entity_form.inc
Overrides EntityInlineEntityFormController::defaultLabels().

File

includes/entity.inline_entity_form.inc, line 39
Defines the base inline entity form controller.

Class

EntityInlineEntityFormController
@file Defines the base inline entity form controller.

Code

public function defaultLabels() {
  $labels = array(
    'singular' => t('entity'),
    'plural' => t('entities'),
  );
  $info = entity_get_info($this->entityType);

  // Commerce and its contribs declare permission labels that can be used
  // for more precise and user-friendly strings.
  if (!empty($info['permission labels'])) {
    $labels = $info['permission labels'];
  }
  return $labels;
}