function theme_entity_property

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 entity.theme.inc theme_entity_property($variables)
cle7 entity.theme.inc theme_entity_property($variables)
elmsmedia7 entity.theme.inc theme_entity_property($variables)
icor7 entity.theme.inc theme_entity_property($variables)
meedjum_blog7 entity.theme.inc theme_entity_property($variables)
mooc7 entity.theme.inc theme_entity_property($variables)

Returns HTML for an entity property.

This is the default theme implementation to display the value of a property. This function can be overridden with varying levels of specificity. For example, for a property named 'title' displayed on the 'article' bundle, any of the following functions will override this default implementation. The first of these functions that exists is used:

  • THEMENAME_property__body__article()
  • THEMENAME_property__article()
  • THEMENAME_property__body()
  • THEMENAME_property()

Parameters

$variables: An associative array containing:

  • label: A boolean indicating to show or hide the property label.
  • title_attributes: A string containing the attributes for the title.
  • label: The label for the property.
  • content_attributes: A string containing the attributes for the content's div.
  • content: The rendered property value.
  • attributes: A string containing the attributes for the wrapping div.

Related topics

3 string references to the theme hook from theme_entity_property()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

EntityAPIController::renderEntityProperty in sites/all/modules/ulmus/entity/includes/entity.controller.inc
Renders a single entity property.
entity_theme in sites/all/modules/ulmus/entity/entity.module
Implements hook_theme().
template_preprocess_entity_property in sites/all/modules/ulmus/entity/theme/entity.theme.inc
Theme preprocess function for theme_entity_property().

File

sites/all/modules/ulmus/entity/theme/entity.theme.inc, line 33
Holds entity module's theme functions.

Code

function theme_entity_property($variables) {
  $output = '';

  // Render the label, if it's not hidden.
  if (!$variables['label_hidden']) {
    $output .= '<div' . $variables['title_attributes'] . '>' . $variables['label'] . ':&nbsp;</div>';
  }

  // Render the content.
  $content_suffix = '';
  if (!$variables['label_hidden'] || $variables['content_attributes']) {
    $output .= '<div' . $variables['content_attributes'] . '>';
    $content_suffix = '</div>';
  }
  $output .= $variables['content'] . $content_suffix;

  // Render the top-level DIV.
  return '<div' . $variables['attributes'] . '>' . $output . '</div>';
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.