public function VarsExtendedTestVars::getDefaults in Variable API 7
Same name and namespace in other branches
- 6.2 tests/vars_extended_test.module \VarsExtendedTestVars::getDefaults()
- 6 tests/vars_extended_test.module \VarsExtendedTestVars::getDefaults()
- 7.2 tests/vars_extended_test.module \VarsExtendedTestVars::getDefaults()
Returns the default value for the variables used by the module.
A module using Variable API should normally implement a class derived from Vars, and overwrite this method.
Return value
An array containing information about the implemented persistent variables.
Overrides Vars::getDefaults
See also
File
- tests/
vars_extended_test.module, line 14 - Module for testing the Variable API module.
Class
- VarsExtendedTestVars
- @file
Code
public function getDefaults() {
return array(
'vars_extended_test_dynamic_first' => array(
'value' => array(
1.1,
),
'flags' => Vars::VARS_DYNAMIC,
),
'vars_extended_test_dynamic_second' => array(
'value' => 'aaaa',
'flags' => Vars::VARS_DYNAMIC,
),
'vars_extended_test_dynamic_third' => array(
'value' => 1111,
'flags' => Vars::VARS_DYNAMIC,
),
'vars_extended_test_dynamic_fourth' => array(
'value' => array(
'aaaaaaaa',
),
'flags' => Vars::VARS_DYNAMIC,
),
'vars_extended_test_static_first' => array(
'value' => 1.1,
'flags' => 0,
),
'vars_extended_test_static_second' => array(
'value' => 'aaaa',
'flags' => 0,
),
'vars_extended_test_static_third' => array(
'value' => 1111,
'flags' => 0,
),
);
}