You are here

function field_rules_entity_property_info in Field Rules 7

Implements hook_entity_property_info() on top of node module.

See also

entity_entity_property_info()

File

./field_rules.module, line 32

Code

function field_rules_entity_property_info() {
  $info = array();

  // Add meta-data about the basic node properties.
  $properties =& $info['node_type']['properties'];
  $properties['type'] = array(
    'label' => t('Node type'),
    'type' => 'text',
    'description' => t('The machine name of this node type.'),
    'setter callback' => 'entity_property_verbatim_set',
    'setter permission' => 'administer content types',
    'getter callback' => 'entity_property_verbatim_get',
    'required' => TRUE,
    'query callback' => 'entity_metadata_table_query',
  );
  $properties['name'] = array(
    'label' => t('Name'),
    'description' => t('The human readable name of this content type.'),
    'setter callback' => 'entity_property_verbatim_set',
    'setter permission' => 'administer content types',
    'getter callback' => 'entity_property_verbatim_get',
    'required' => TRUE,
    'query callback' => 'entity_metadata_table_query',
  );
  $properties['description'] = array(
    'label' => t('Description'),
    'description' => t('The description of this content type.'),
    'setter callback' => 'entity_property_verbatim_set',
    'setter permission' => 'administer content types',
    'getter callback' => 'entity_property_verbatim_get',
  );
  $properties['help'] = array(
    'label' => t('Help'),
    'description' => t('The help of this content type.'),
    'setter callback' => 'entity_property_verbatim_set',
    'setter permission' => 'administer content types',
    'getter callback' => 'entity_property_verbatim_get',
  );
  $properties['has_title'] = array(
    'label' => t('Has title'),
    'type' => 'boolean',
    'description' => t('Whether the node type has a title.'),
    'setter callback' => 'entity_property_verbatim_set',
    'setter permission' => 'administer content types',
    'getter callback' => 'entity_property_verbatim_get',
  );
  $properties['has_body'] = array(
    'label' => t('Has title'),
    'type' => 'boolean',
    'description' => t('Whether the node type has a title.'),
    'setter callback' => 'entity_property_verbatim_set',
    'setter permission' => 'administer content types',
    'getter callback' => 'entity_property_verbatim_get',
  );
  $properties['title_label'] = array(
    'label' => t('Title label'),
    'description' => t('The label for the title of this content type.'),
    'setter callback' => 'entity_property_verbatim_set',
    'setter permission' => 'administer content types',
    'getter callback' => 'entity_property_verbatim_get',
  );
  $properties['title'] = array(
    'label' => t('Title'),
    'description' => t('The title of the node.'),
    'setter callback' => 'entity_property_verbatim_set',
    'query callback' => 'entity_metadata_table_query',
    'required' => TRUE,
  );
  return $info;
}