Commit b12a6d1c authored by tekante's avatar tekante Committed by fago

#640024 patch by tekante: make it easier to customize the generated entity property info.

parent 7b2a1401
......@@ -69,7 +69,7 @@ class EntityDefaultMetadataController {
$entity_label = drupal_strtolower($this->info['label']);
// Provide defaults based on the schema.
$info['properties'] = entity_metadata_convert_schema($this->info['base table']);
$info['properties'] = $this->convertSchema();
foreach ($info['properties'] as $name => &$property) {
// Add a description.
$property['description'] = t('@entity "@property" property.', array('@entity' => drupal_ucfirst($entity_label), '@property' => $name));
......@@ -115,6 +115,13 @@ class EntityDefaultMetadataController {
return $options;
}
}
/**
* Return a set of properties for an entity based on the schema definition
*/
protected function convertSchema() {
return entity_metadata_convert_schema($this->info['base table']);
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment