drupal core updated to 7.28
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Hooks provided by the Field module.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup hooks
|
||||
@@ -37,6 +41,8 @@
|
||||
* - delete: (optional) String containing markup (normally a link) used as the
|
||||
* element's 'delete' operation in the administration interface. Only for
|
||||
* 'form' context.
|
||||
*
|
||||
* @ingroup field_types
|
||||
*/
|
||||
function hook_field_extra_fields() {
|
||||
$extra['node']['poll'] = array(
|
||||
@@ -76,6 +82,8 @@ function hook_field_extra_fields() {
|
||||
* The associative array of 'pseudo-field' components.
|
||||
*
|
||||
* @see hook_field_extra_fields()
|
||||
*
|
||||
* @ingroup field_types
|
||||
*/
|
||||
function hook_field_extra_fields_alter(&$info) {
|
||||
// Force node title to always be at the top of the list by default.
|
||||
@@ -113,6 +121,9 @@ function hook_field_extra_fields_alter(&$info) {
|
||||
/**
|
||||
* Define Field API field types.
|
||||
*
|
||||
* Along with this hook, you also need to implement other hooks. See
|
||||
* @link field_types Field Types API @endlink for more information.
|
||||
*
|
||||
* @return
|
||||
* An array whose keys are field type names and whose values are arrays
|
||||
* describing the field type, with the following key/value pairs:
|
||||
@@ -199,8 +210,11 @@ function hook_field_info_alter(&$info) {
|
||||
/**
|
||||
* Define the Field API schema for a field structure.
|
||||
*
|
||||
* This hook MUST be defined in .install for it to be detected during
|
||||
* installation and upgrade.
|
||||
* This is invoked when a field is created, in order to obtain the database
|
||||
* schema from the module that defines the field's type.
|
||||
*
|
||||
* This hook must be defined in the module's .install file for it to be detected
|
||||
* during installation and upgrade.
|
||||
*
|
||||
* @param $field
|
||||
* A field structure.
|
||||
@@ -650,6 +664,8 @@ function hook_field_delete_revision($entity_type, $entity, $field, $instance, $l
|
||||
* The source entity from which field values are being copied.
|
||||
* @param $source_langcode
|
||||
* The source language from which field values are being copied.
|
||||
*
|
||||
* @ingroup field_language
|
||||
*/
|
||||
function hook_field_prepare_translation($entity_type, $entity, $field, $instance, $langcode, &$items, $source_entity, $source_langcode) {
|
||||
// If the translating user is not permitted to use the assigned text format,
|
||||
@@ -1244,7 +1260,7 @@ function hook_field_formatter_view($entity_type, $entity, $field, $instance, $la
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ingroup field_attach
|
||||
* @addtogroup field_attach
|
||||
* @{
|
||||
*/
|
||||
|
||||
@@ -1306,6 +1322,13 @@ function hook_field_attach_load($entity_type, $entities, $age, $options) {
|
||||
* This hook is invoked after the field module has performed the operation.
|
||||
*
|
||||
* See field_attach_validate() for details and arguments.
|
||||
*
|
||||
* @param $entity_type
|
||||
* The type of $entity; e.g., 'node' or 'user'.
|
||||
* @param $entity
|
||||
* The entity with fields to validate.
|
||||
* @param array $errors
|
||||
* An associative array of errors keyed by field_name, language, delta.
|
||||
*/
|
||||
function hook_field_attach_validate($entity_type, $entity, &$errors) {
|
||||
// @todo Needs function body.
|
||||
@@ -1510,6 +1533,8 @@ function hook_field_attach_prepare_translation_alter(&$entity, $context) {
|
||||
* - entity_type: The type of the entity to be displayed.
|
||||
* - entity: The entity with fields to render.
|
||||
* - langcode: The language code $entity has to be displayed in.
|
||||
*
|
||||
* @ingroup field_language
|
||||
*/
|
||||
function hook_field_language_alter(&$display_language, $context) {
|
||||
// Do not apply core language fallback rules if they are disabled or if Locale
|
||||
@@ -1531,6 +1556,8 @@ function hook_field_language_alter(&$display_language, $context) {
|
||||
* An associative array containing:
|
||||
* - entity_type: The type of the entity the field is attached to.
|
||||
* - field: A field data structure.
|
||||
*
|
||||
* @ingroup field_language
|
||||
*/
|
||||
function hook_field_available_languages_alter(&$languages, $context) {
|
||||
// Add an unavailable language.
|
||||
@@ -1581,7 +1608,7 @@ function hook_field_attach_rename_bundle($entity_type, $bundle_old, $bundle_new)
|
||||
* @param $entity_type
|
||||
* The type of entity; for example, 'node' or 'user'.
|
||||
* @param $bundle
|
||||
* The bundle that was just deleted.
|
||||
* The name of the bundle that was just deleted.
|
||||
* @param $instances
|
||||
* An array of all instances that existed for the bundle before it was
|
||||
* deleted.
|
||||
@@ -1596,7 +1623,7 @@ function hook_field_attach_delete_bundle($entity_type, $bundle, $instances) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @} End of "defgroup field_attach".
|
||||
* @} End of "addtogroup field_attach".
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -2256,6 +2283,10 @@ function hook_field_storage_pre_update($entity_type, $entity, &$skip_fields) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @} End of "addtogroup field_storage
|
||||
*/
|
||||
|
||||
/**
|
||||
* Returns the maximum weight for the entity components handled by the module.
|
||||
*
|
||||
@@ -2269,9 +2300,12 @@ function hook_field_storage_pre_update($entity_type, $entity, &$skip_fields) {
|
||||
* @param $context
|
||||
* The context for which the maximum weight is requested. Either 'form', or
|
||||
* the name of a view mode.
|
||||
*
|
||||
* @return
|
||||
* The maximum weight of the entity's components, or NULL if no components
|
||||
* were found.
|
||||
*
|
||||
* @ingroup field_info
|
||||
*/
|
||||
function hook_field_info_max_weight($entity_type, $bundle, $context) {
|
||||
$weights = array();
|
||||
@@ -2283,6 +2317,11 @@ function hook_field_info_max_weight($entity_type, $bundle, $context) {
|
||||
return $weights ? max($weights) : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @addtogroup field_types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Alters the display settings of a field before it gets displayed.
|
||||
*
|
||||
@@ -2349,6 +2388,10 @@ function hook_field_display_ENTITY_TYPE_alter(&$display, $context) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @} End of "addtogroup field_types
|
||||
*/
|
||||
|
||||
/**
|
||||
* Alters the display settings of pseudo-fields before an entity is displayed.
|
||||
*
|
||||
@@ -2364,6 +2407,8 @@ function hook_field_display_ENTITY_TYPE_alter(&$display, $context) {
|
||||
* - entity_type: The entity type; e.g., 'node' or 'user'.
|
||||
* - bundle: The bundle name.
|
||||
* - view_mode: The view mode, e.g. 'full', 'teaser'...
|
||||
*
|
||||
* @ingroup field_types
|
||||
*/
|
||||
function hook_field_extra_fields_display_alter(&$displays, $context) {
|
||||
if ($context['entity_type'] == 'taxonomy_term' && $context['view_mode'] == 'full') {
|
||||
@@ -2393,6 +2438,8 @@ function hook_field_extra_fields_display_alter(&$displays, $context) {
|
||||
* - instance: The instance of the field.
|
||||
*
|
||||
* @see hook_field_widget_properties_alter()
|
||||
*
|
||||
* @ingroup field_widget
|
||||
*/
|
||||
function hook_field_widget_properties_ENTITY_TYPE_alter(&$widget, $context) {
|
||||
// Change a widget's type according to the time of day.
|
||||
@@ -2403,10 +2450,6 @@ function hook_field_widget_properties_ENTITY_TYPE_alter(&$widget, $context) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @} End of "addtogroup field_storage".
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup field_crud
|
||||
* @{
|
||||
@@ -2602,6 +2645,8 @@ function hook_field_purge_instance($instance) {
|
||||
*
|
||||
* @param $field
|
||||
* The field being purged.
|
||||
*
|
||||
* @ingroup field_storage
|
||||
*/
|
||||
function hook_field_storage_purge_field($field) {
|
||||
$table_name = _field_sql_storage_tablename($field);
|
||||
@@ -2619,6 +2664,8 @@ function hook_field_storage_purge_field($field) {
|
||||
*
|
||||
* @param $instance
|
||||
* The instance being purged.
|
||||
*
|
||||
* @ingroup field_storage
|
||||
*/
|
||||
function hook_field_storage_purge_field_instance($instance) {
|
||||
db_delete('my_module_field_instance_info')
|
||||
@@ -2640,6 +2687,8 @@ function hook_field_storage_purge_field_instance($instance) {
|
||||
* The (possibly deleted) field whose data is being purged.
|
||||
* @param $instance
|
||||
* The deleted field instance whose data is being purged.
|
||||
*
|
||||
* @ingroup field_storage
|
||||
*/
|
||||
function hook_field_storage_purge($entity_type, $entity, $field, $instance) {
|
||||
list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
|
||||
@@ -2679,6 +2728,8 @@ function hook_field_storage_purge($entity_type, $entity, $field, $instance) {
|
||||
*
|
||||
* @return
|
||||
* TRUE if the operation is allowed, and FALSE if the operation is denied.
|
||||
*
|
||||
* @ingroup field_types
|
||||
*/
|
||||
function hook_field_access($op, $field, $entity_type, $entity, $account) {
|
||||
if ($field['field_name'] == 'field_of_interest' && $op == 'edit') {
|
||||
|
@@ -976,6 +976,12 @@ function field_attach_insert($entity_type, $entity) {
|
||||
/**
|
||||
* Save field data for an existing entity.
|
||||
*
|
||||
* When calling this function outside an entity save operation be sure to
|
||||
* clear caches for the entity:
|
||||
* @code
|
||||
* entity_get_controller($entity_type)->resetCache(array($entity_id))
|
||||
* @endcode
|
||||
*
|
||||
* @param $entity_type
|
||||
* The type of $entity; e.g. 'node' or 'user'.
|
||||
* @param $entity
|
||||
|
@@ -11,8 +11,8 @@ dependencies[] = field_sql_storage
|
||||
required = TRUE
|
||||
stylesheets[all][] = theme/field.css
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-08-08
|
||||
version = "7.23"
|
||||
; Information added by Drupal.org packaging script on 2014-05-08
|
||||
version = "7.28"
|
||||
project = "drupal"
|
||||
datestamp = "1375928238"
|
||||
datestamp = "1399522731"
|
||||
|
||||
|
@@ -819,9 +819,9 @@ function field_view_value($entity_type, $entity, $field_name, $item, $display =
|
||||
*
|
||||
* This function can be used by third-party modules that need to output an
|
||||
* isolated field.
|
||||
* - Do not use inside node (or other entities) templates, use
|
||||
* - Do not use inside node (or any other entity) templates; use
|
||||
* render($content[FIELD_NAME]) instead.
|
||||
* - Do not use to display all fields in an entity, use
|
||||
* - Do not use to display all fields in an entity; use
|
||||
* field_attach_prepare_view() and field_attach_view() instead.
|
||||
* - The field_view_value() function can be used to output a single formatted
|
||||
* field value, without label or wrapping field markup.
|
||||
|
@@ -7,8 +7,8 @@ dependencies[] = field
|
||||
files[] = field_sql_storage.test
|
||||
required = TRUE
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-08-08
|
||||
version = "7.23"
|
||||
; Information added by Drupal.org packaging script on 2014-05-08
|
||||
version = "7.28"
|
||||
project = "drupal"
|
||||
datestamp = "1375928238"
|
||||
datestamp = "1399522731"
|
||||
|
||||
|
@@ -7,8 +7,8 @@ dependencies[] = field
|
||||
dependencies[] = options
|
||||
files[] = tests/list.test
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-08-08
|
||||
version = "7.23"
|
||||
; Information added by Drupal.org packaging script on 2014-05-08
|
||||
version = "7.28"
|
||||
project = "drupal"
|
||||
datestamp = "1375928238"
|
||||
datestamp = "1399522731"
|
||||
|
||||
|
@@ -5,8 +5,8 @@ package = Testing
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-08-08
|
||||
version = "7.23"
|
||||
; Information added by Drupal.org packaging script on 2014-05-08
|
||||
version = "7.28"
|
||||
project = "drupal"
|
||||
datestamp = "1375928238"
|
||||
datestamp = "1399522731"
|
||||
|
||||
|
@@ -6,8 +6,8 @@ core = 7.x
|
||||
dependencies[] = field
|
||||
files[] = number.test
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-08-08
|
||||
version = "7.23"
|
||||
; Information added by Drupal.org packaging script on 2014-05-08
|
||||
version = "7.28"
|
||||
project = "drupal"
|
||||
datestamp = "1375928238"
|
||||
datestamp = "1399522731"
|
||||
|
||||
|
@@ -6,8 +6,8 @@ core = 7.x
|
||||
dependencies[] = field
|
||||
files[] = options.test
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-08-08
|
||||
version = "7.23"
|
||||
; Information added by Drupal.org packaging script on 2014-05-08
|
||||
version = "7.28"
|
||||
project = "drupal"
|
||||
datestamp = "1375928238"
|
||||
datestamp = "1399522731"
|
||||
|
||||
|
@@ -359,7 +359,7 @@ class OptionsWidgetsTestCase extends FieldTestCase {
|
||||
|
||||
// Test the 'None' option.
|
||||
|
||||
// Check that the 'none' option has no efect if actual options are selected
|
||||
// Check that the 'none' option has no effect if actual options are selected
|
||||
// as well.
|
||||
$edit = array("card_2[$langcode][]" => array('_none' => '_none', 0 => 0));
|
||||
$this->drupalPost('test-entity/manage/' . $entity->ftid . '/edit', $edit, t('Save'));
|
||||
|
@@ -7,8 +7,8 @@ dependencies[] = field
|
||||
files[] = text.test
|
||||
required = TRUE
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-08-08
|
||||
version = "7.23"
|
||||
; Information added by Drupal.org packaging script on 2014-05-08
|
||||
version = "7.28"
|
||||
project = "drupal"
|
||||
datestamp = "1375928238"
|
||||
datestamp = "1399522731"
|
||||
|
||||
|
@@ -6,8 +6,8 @@ files[] = field_test.entity.inc
|
||||
version = VERSION
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-08-08
|
||||
version = "7.23"
|
||||
; Information added by Drupal.org packaging script on 2014-05-08
|
||||
version = "7.28"
|
||||
project = "drupal"
|
||||
datestamp = "1375928238"
|
||||
datestamp = "1399522731"
|
||||
|
||||
|
@@ -60,7 +60,7 @@ function field_test_schema() {
|
||||
'description' => 'The base table for test entities with a bundle key.',
|
||||
'fields' => array(
|
||||
'ftid' => array(
|
||||
'description' => 'The primary indentifier for a test_entity_bundle_key.',
|
||||
'description' => 'The primary identifier for a test_entity_bundle_key.',
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
@@ -79,7 +79,7 @@ function field_test_schema() {
|
||||
'description' => 'The base table for test entities with a bundle.',
|
||||
'fields' => array(
|
||||
'ftid' => array(
|
||||
'description' => 'The primary indentifier for a test_entity_bundle.',
|
||||
'description' => 'The primary identifier for a test_entity_bundle.',
|
||||
'type' => 'int',
|
||||
'unsigned' => TRUE,
|
||||
'not null' => TRUE,
|
||||
|
Reference in New Issue
Block a user