You are here

public function EntityInlineEntityFormController::labels in Inline Entity Form 7

Returns an array of entity type labels fit for display in the UI.

3 calls to EntityInlineEntityFormController::labels()
CommerceProductInlineEntityFormController::entityForm in includes/commerce_product.inline_entity_form.inc
Overrides EntityInlineEntityFormController::entityForm().
EntityInlineEntityFormController::removeForm in includes/entity.inline_entity_form.inc
Returns the remove form to be shown through the IEF widget.
EntityInlineEntityFormController::settingsForm in includes/entity.inline_entity_form.inc
Returns the settings form for the current entity type.

File

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

Class

EntityInlineEntityFormController
@file Defines the base inline entity form controller.

Code

public function labels() {
  $labels = $this
    ->defaultLabels();

  // The admin has specified the exact labels that should be used.
  if ($this->settings['override_labels']) {
    $labels = array(
      'singular' => $this->settings['label_singular'],
      'plural' => $this->settings['label_plural'],
    );
  }
  return $labels;
}