public function formatDisplay($key, &$attributes, \GO\Customfields\Model\AbstractCustomFieldsRecord $model) { if (!empty($this->field->multiselect) && isset($attributes[$key])) { $attributes[$key] = str_replace('|', ', ', $attributes[$key]); } return parent::formatDisplay($key, $attributes, $model); }
public function validate($value) { if ($value === false || !empty($value) && !is_numeric($value)) { return false; } return parent::validate($value); }
public function formatFormOutput($key, &$attributes, \GO\Customfields\Model\AbstractCustomFieldsRecord $model) { if (!\GO\Customfields\Model\AbstractCustomFieldsRecord::$formatForExport) { return parent::formatFormOutput($key, $attributes, $model); } else { return $this->getName($attributes[$key]); } }