MINOR Allowing to retrieve the whole configuration array in DateField/TimeField/DateetimeField->getConfig()

This commit is contained in:
Ingo Schommer 2011-09-19 15:29:43 +02:00
parent a60f03f28e
commit 168b1ff279
3 changed files with 11 additions and 11 deletions

View File

@ -471,11 +471,11 @@ JS;
}
/**
* @param String $name
* @return mixed
* @param String $name Optional, returns the whole configuration array if empty
* @return mixed|array
*/
function getConfig($name) {
return $this->config[$name];
function getConfig($name = null) {
return $name ? $this->config[$name] : $this->config;
}
}

View File

@ -148,11 +148,11 @@ class DatetimeField extends FormField {
* Note: Use {@link getDateField()} and {@link getTimeField()}
* to get field-specific config options.
*
* @param String $name
* @param String $name Optional, returns the whole configuration array if empty
* @return mixed
*/
function getConfig($name) {
return $this->config[$name];
function getConfig($name = null) {
return $name ? $this->config[$name] : $this->config;
}
function validate($validator) {

View File

@ -181,11 +181,11 @@ class TimeField extends TextField {
}
/**
* @param String $name
* @return mixed
* @param String $name Optional, returns the whole configuration array if empty
* @return mixed|array
*/
function getConfig($name) {
return $this->config[$name];
function getConfig($name = null) {
return $name ? $this->config[$name] : $this->config;
}
/**