function entity_get_all_property_info

7.x entity_get_all_property_info($entity_type = NULL)

Gets an array of info about all properties of a given entity type.

In contrast to entity_get_property_info(), this function returns info about all properties the entity might have, thus it adds an all properties assigned to entity bundles.


$entity_type: (optiona) The entity type to return properties for.

Return value

An array of info about properties. If the type is ommitted, all known properties are returned.

7 calls to entity_get_all_property_info()
Entity::getTranslation in entity/includes/
Gets the raw, translated value of a property or field.
EntityDefaultI18nStringController::translatableProperties in entity/
Defines translatable properties used by self::hook_object_info().
entity_metadata_table_query in entity/modules/
Callback for querying entity properties having their values stored in the entities main db table.
entity_property_query in entity/includes/
Queries for entities having the given property value.
entity_token_token_info_alter in entity/
Implements hook_token_info_alter().

... See full list


entity/includes/, line 75
Provides API functions around hook_entity_property_info(). Also see, which cares for providing entity property info for all core entity types.


function entity_get_all_property_info($entity_type = NULL) {
  if (!isset($entity_type)) {
    // Retrieve all known properties.
    $properties = array();
    foreach (entity_get_info() as $entity_type => $info) {
      $properties += entity_get_all_property_info($entity_type);
    return $properties;
  // Else retrieve the properties of the given entity type only.
  $info = entity_get_property_info($entity_type);
  $info += array(
    'properties' => array(),
    'bundles' => array(),
  // Add all bundle properties.
  foreach ($info['bundles'] as $bundle => $bundle_info) {
    $bundle_info += array('properties' => array());
    $info['properties'] += $bundle_info['properties'];
  return $info['properties'];