You are here

public function FlexiformDisplayEditPage::getBaseEntity in Flexiform 7

Get the base entity for a flexiform.

By default we just create a new entity.

Overrides FlexiformDisplayBase::getBaseEntity

File

includes/display/edit_page.display.inc, line 58
Define Display plugin for the add page.

Class

FlexiformDisplayEditPage
Class for add page displays.

Code

public function getBaseEntity($context = array()) {
  $base_entity = entity_load_single($this
    ->getFlexiform()->base_entity, $context['base_entity_id']);

  //@todo: Check the entity is the right bundle.
  return $base_entity;
}