config = array_merge($this->config, $config); $this->label = $label; $this->ismulti = (bool) $ismulti; } /** * Returns data as associative array * * @return array */ public function getAsEntry() { return array( 'config' => json_encode($this->config), 'label' => $this->label, 'ismulti' => $this->ismulti, 'class' => $this->getClass() ); } /** * The class name of this type (no namespace) * @return string */ public function getClass() { return substr(get_class($this), 20); } /** * Return the current configuration for this type * * @return array */ public function getConfig() { return $this->config; } /** * @return boolean */ public function isMulti() { return $this->ismulti; } /** * @return string */ public function getLabel() { return $this->label; } /** * Return the editor to edit a single value * * @param string $name the form name where this has to be stored * @param string $value the current value * @return string html */ abstract public function valueEditor($name, $value); /** * Output the stored data * * @param string|int $value the value stored in the database * @return string the HTML to represent this data */ abstract public function getDisplayData($value); }