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

View File

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

View File

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