/** * SelectField::getValue() * * Return the value of the field * * @return mixed * @access public * @author Teye Heimans */ function getValue() { // are multiple selects possible? if ($this->_bMultiple) { // is there a value ? if (isset($this->_mValue)) { if (is_string($this->_mValue)) { return explode(',', $this->_mValue); } } else { return array(); } } return parent::getValue(); }
function getValue() { return $this->imgDir . parent::getValue(); }
public function get($instance, Field $f) { return $f->getValue($instance); }
public function getValue($condense = true) { if ($this->value === "" || is_array($this->value) && !count($this->value)) { return $this->emptyValue; } return parent::getValue(); }
/** * Getter for field's value * @return mixed */ public function getValue() { return !is_null(parent::getValue()) ? date($this->outputFormat, parent::getValue()) : null; }
public function validate(Field $field) { $l = strlen($field->getValue()); if ($l < $this->min) { return $field->addError(sprintf($this->too_short, $field->getName(), $this->min)); } elseif ($l > $this->max) { return $field->addError(sprintf($this->too_long, $field->getName(), $this->max)); } }
protected static function renderButtonInput(Field $field) { return sprintf('<button type="%s" name="%s" value="%s" %s>%s</button>', $field->getType(), $field->getName(), $field->getValue(), $field->getAttributes(), $field->getLabel()); }
/** * {@inheritdoc} * * @return int|float */ public function getValue() { // Ensure value is int or float; adding 0 will convert type from string return 0 + parent::getValue(); }