/** * Gets a help text by field name. * * @param string $name The field name (required - the default value is here because PHP do not allow signature changes with inheritance) * * @return string The help text or an empty string if it is not defined * * @throws InvalidArgumentException when you try to get a help for a none existing widget */ public function getHelp($name = null) { if (1 == func_num_args()) { if (!isset($this->fields[$name])) { throw new InvalidArgumentException(sprintf('Unable to get the help on an unexistant widget ("%s").', $name)); } return $this->fields[$name]->getHelp(); } else { // help for this widget schema return parent::getHelp(); } }