You are here

public function EntityClass::buildContent in Entity API 7

Override buildContent() to add the username to the output.

Overrides Entity::buildContent

File

tests/entity_test.module, line 141
Test module for the entity API.

Class

EntityClass
Main class for test entities.

Code

public function buildContent($view_mode = 'full', $langcode = NULL) {
  $content['user'] = array(
    '#markup' => "User: " . format_username(user_load($this->uid)),
  );
  return entity_get_controller($this->entityType)
    ->buildContent($this, $view_mode, $langcode, $content);
}