summaryrefslogtreecommitdiff
path: root/modules/field/field.api.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-30 19:35:47 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-30 19:35:47 +0000
commiteb34d29999f0f0c4f36201cb01be9f936f9a1fc1 (patch)
tree56385b76aadc0ba7c7578899e5f55ecd1fe9de29 /modules/field/field.api.php
parent6ef2ddae21279e50db21fb816442470b449cd1d1 (diff)
downloadbrdo-eb34d29999f0f0c4f36201cb01be9f936f9a1fc1.tar.gz
brdo-eb34d29999f0f0c4f36201cb01be9f936f9a1fc1.tar.bz2
- Patch #534318 by yched: better defaults and corrected documentation.
Diffstat (limited to 'modules/field/field.api.php')
-rw-r--r--modules/field/field.api.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/field/field.api.php b/modules/field/field.api.php
index 425786093..c6d80db86 100644
--- a/modules/field/field.api.php
+++ b/modules/field/field.api.php
@@ -171,7 +171,9 @@ function hook_field_info() {
function hook_field_info_alter(&$info) {
// Add a setting to all field types.
foreach ($info as $field_type => $field_type_info) {
- $info[$field_type]['settings'][] = array('mymodule_additional_setting' => 'default value');
+ $info[$field_type]['settings'] += array(
+ 'mymodule_additional_setting' => 'default value',
+ );
}
// Change the default widget for fields of type 'foo'.
@@ -261,7 +263,9 @@ function hook_field_widget_info() {
*/
function hook_field_widget_info_alter(&$info) {
// Add a setting to a widget type.
- $info['text_textfield']['settings'][] = array('mymodule_additional_setting' => 'default value');
+ $info['text_textfield']['settings'] += array(
+ 'mymodule_additional_setting' => 'default value',
+ );
// Let a new field type re-use an existing widget.
$info['options_select']['field types'][] = 'my_field_type';
@@ -290,7 +294,9 @@ function hook_field_formatter_info() {
*/
function hook_field_formatter_info_alter(&$info) {
// Add a setting to a formatter type.
- $info['text_default']['settings'][] = array('mymodule_additional_setting' => 'default value');
+ $info['text_default']['settings'] += array(
+ 'mymodule_additional_setting' => 'default value',
+ );
// Let a new field type re-use an existing formatter.
$info['text_default']['field types'][] = 'my_field_type';