diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-08 07:06:27 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-08 07:06:27 +0000 |
commit | 6d13ffa4869fc6a07f5d874a6c3a640349bfd719 (patch) | |
tree | a79d6c2849e156df49d5d6acd5a886640b5bfc73 /modules | |
parent | 1d9e77a513d02d0922af8d207edf44a7acff08cc (diff) | |
download | brdo-6d13ffa4869fc6a07f5d874a6c3a640349bfd719.tar.gz brdo-6d13ffa4869fc6a07f5d874a6c3a640349bfd719.tar.bz2 |
#977346 by jhodgdon, joachim: Fixed More detailed docs for entity_label
Diffstat (limited to 'modules')
-rw-r--r-- | modules/system/system.api.php | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 4be4a7660..b9c8209cd 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -88,10 +88,15 @@ function hook_hook_info_alter(&$hooks) { * uri elements of the entity, e.g. 'path' and 'options'. The actual entity * uri can be constructed by passing these elements to url(). * - label callback: (optional) A function taking an entity as argument and - * returning the label of the entity; e.g., $node->title or - * $comment->subject. A callback should be specified when the label is the - * result of complex logic. Otherwise, the 'label' property of the - * 'entity keys' the property should be used. + * returning the label of the entity. The entity label is the main string + * associated with an entity; for example, the title of a node or the + * subject of a comment. If there is an entity object property that defines + * the label, use the 'label' element of the 'entity keys' return + * value component to provide this information (see below). If more complex + * logic is needed to determine the label of an entity, you can instead + * specify a callback function here, which will be called to determine the + * entity label. See also the entity_label() function, which implements this + * logic. * - fieldable: Set to TRUE if you want your entity type to be fieldable. * - translation: An associative array of modules registered as field * translation handlers. Array keys are the module names, array values @@ -112,11 +117,11 @@ function hook_hook_info_alter(&$hooks) { * omitted if this entity type exposes a single bundle (all entities have * the same collection of fields). The name of this single bundle will be * the same as the entity type. - * - label: The property name of the entity that contains the label. For + * - label: The name of the property that contains the entity label. For * example, if the entity's label is located in $entity->subject, then - * 'subect' should be specified here. In case complex logic is required to - * build the label, a 'label callback' should be implemented instead. See - * entity_label() for details. + * 'subject' should be specified here. If complex logic is required to + * build the label, a 'label callback' should be defined instead (see + * the 'label callback' section above for details). * - bundle keys: An array describing how the Field API can extract the * information it needs from the bundle objects for this type (e.g * $vocabulary objects for terms; not applicable for nodes). This entry can |