function entity_metadata_comment_entity_property_info_alter

cis7 entity_metadata_comment_entity_property_info_alter(&$info)
cle7 entity_metadata_comment_entity_property_info_alter(&$info)
elmsmedia7 entity_metadata_comment_entity_property_info_alter(&$info)
icor7 entity_metadata_comment_entity_property_info_alter(&$info)
meedjum_blog7 entity_metadata_comment_entity_property_info_alter(&$info)
mooc7 entity_metadata_comment_entity_property_info_alter(&$info)

Implements hook_entity_property_info_alter() on top of comment module.

See also



sites/all/modules/ulmus/entity/modules/, line 130
Provides info about the comment entity.


function entity_metadata_comment_entity_property_info_alter(&$info) {
  // Add info about comment module related properties to the node entity.
  $properties = &$info['node']['properties'];
  $properties['comment'] = array(
    'label' => t("Comments allowed"),
    'description' => t("Whether comments are allowed on this node: 0 = no, 1 = closed (read only), 2 = open (read/write)."),
    'setter callback' => 'entity_property_verbatim_set',
    'setter permission' => 'administer comments',
    'type' => 'integer',
  $properties['comments'] = array(
    'label' => t("Comments"),
    'type' => 'list<comment>',
    'description' => t("The node comments."),
    'getter callback' => 'entity_metadata_comment_get_node_properties',
    'computed' => TRUE,
  $properties['comment_count'] = array(
    'label' => t("Comment count"),
    'description' => t("The number of comments posted on a node."),
    'getter callback' => 'entity_metadata_comment_get_node_properties',
    'type' => 'integer',
  $properties['comment_count_new'] = array(
    'label' => t("New comment count"),
    'description' => t("The number of comments posted on a node since the reader last viewed it."),
    'getter callback' => 'entity_metadata_comment_get_node_properties',
    'type' => 'integer',

  // The comment body field is usually available for all bundles, so add it
  // directly to the comment entity.
  $info['comment']['properties']['comment_body'] = array(
    'type' => 'text_formatted',
    'label' => t('The main body text'),
    'getter callback' => 'entity_metadata_field_verbatim_get',
    'setter callback' => 'entity_metadata_field_verbatim_set',
    'property info' => entity_property_text_formatted_info(),
    'field' => TRUE,
    'required' => TRUE,
  unset($info['comment']['properties']['comment_body']['property info']['summary']);



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.