You are here

public function Profile::buildContent in Profile 2 7

Same name and namespace in other branches
  1. 7.2 profile2.module \Profile::buildContent()

Builds a structured array representing the entity's content.

Overrides Entity::buildContent

See also

entity_build_content()

File

./profile2.module, line 991
Support for configurable user profiles.

Class

Profile
The class used for profile entities.

Code

public function buildContent($view_mode = 'full', $langcode = NULL) {
  $content = array();

  // Assume newly create objects are still empty.
  if (!empty($this->is_new)) {
    $content['empty']['#markup'] = '<em class="profile2-no-data">' . t('There is no profile data yet.') . '</em>';
  }
  return entity_get_controller($this->entityType)
    ->buildContent($this, $view_mode, $langcode, $content);
}