diff options
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/includes/common.inc b/includes/common.inc index f80496bf8..401c053f3 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -7449,12 +7449,12 @@ function drupal_check_incompatibility($v, $current_version) { /** * Get the entity info array of an entity type. * - * @see hook_entity_info() - * @see hook_entity_info_alter() - * * @param $entity_type * The entity type, e.g. node, for which the info shall be returned, or NULL * to return an array with info about all types. + * + * @see hook_entity_info() + * @see hook_entity_info_alter() */ function entity_get_info($entity_type = NULL) { global $language; @@ -7542,12 +7542,13 @@ function entity_info_cache_clear() { * The entity type; e.g. 'node' or 'user'. * @param $entity * The entity from which to extract values. + * * @return * A numerically indexed array (not a hash table) containing these * elements: - * 0: primary id of the entity - * 1: revision id of the entity, or NULL if $entity_type is not versioned - * 2: bundle name of the entity + * - 0: Primary ID of the entity. + * - 1: Revision ID of the entity, or NULL if $entity_type is not versioned. + * - 2: Bundle name of the entity, or NULL if $entity_type has no bundles. */ function entity_extract_ids($entity_type, $entity) { $info = entity_get_info($entity_type); @@ -7580,13 +7581,12 @@ function entity_extract_ids($entity_type, $entity) { * @param $entity_type * The entity type; e.g. 'node' or 'user'. * @param $ids - * A numerically indexed array, as returned by entity_extract_ids(), - * containing these elements: - * 0: primary id of the entity - * 1: revision id of the entity, or NULL if $entity_type is not versioned - * 2: bundle name of the entity, or NULL if $entity_type has no bundles + * A numerically indexed array, as returned by entity_extract_ids(). + * * @return * An entity structure, initialized with the ids provided. + * + * @see entity_extract_ids() */ function entity_create_stub_entity($entity_type, $ids) { $entity = new stdClass(); @@ -7616,11 +7616,6 @@ function entity_create_stub_entity($entity_type, $ids) { * DrupalDefaultEntityController class. See node_entity_info() and the * NodeController in node.module as an example. * - * @see hook_entity_info() - * @see DrupalEntityControllerInterface - * @see DrupalDefaultEntityController - * @see EntityFieldQuery - * * @param $entity_type * The entity type to load, e.g. node or user. * @param $ids @@ -7638,6 +7633,11 @@ function entity_create_stub_entity($entity_type, $ids) { * found, an empty array is returned. * * @todo Remove $conditions in Drupal 8. + * + * @see hook_entity_info() + * @see DrupalEntityControllerInterface + * @see DrupalDefaultEntityController + * @see EntityFieldQuery */ function entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = FALSE) { if ($reset) { @@ -7657,7 +7657,7 @@ function entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = * @param $entity_type * The entity type to load, e.g. node or user. * @param $id - * The id of the entity to load. + * The ID of the entity to load. * * @return * The unchanged entity, or FALSE if the entity cannot be loaded. @@ -7694,7 +7694,6 @@ function entity_get_controller($entity_type) { * recursion. By convention, entity_prepare_view() is called after * field_attach_prepare_view() to allow entity level hooks to act on content * loaded by field API. - * @see hook_entity_prepare_view() * * @param $entity_type * The type of entity, i.e. 'node', 'user'. @@ -7703,6 +7702,8 @@ function entity_get_controller($entity_type) { * @param $langcode * (optional) A language code to be used for rendering. Defaults to the global * content language of the current request. + * + * @see hook_entity_prepare_view() */ function entity_prepare_view($entity_type, $entities, $langcode = NULL) { if (!isset($langcode)) { @@ -7833,7 +7834,7 @@ function entity_language($entity_type, $entity) { } /** - * Helper function for attaching field API validation to entity forms. + * Attaches field API validation to entity forms. */ function entity_form_field_validate($entity_type, $form, &$form_state) { // All field attach API functions act on an entity object, but during form @@ -7846,7 +7847,7 @@ function entity_form_field_validate($entity_type, $form, &$form_state) { } /** - * Helper function for copying submitted values to entity properties for simple entity forms. + * Copies submitted values to entity properties for simple entity forms. * * During the submission handling of an entity form's "Save", "Preview", and * possibly other buttons, the form state's entity needs to be updated with the |