/** * Function: get_field_def * Description: Get the field definition attributes that are required for the Highlightfield Field * the primary reason this function is here is to set the dbType to 'varchar', * otherwise 'Highlightfield' would be used by default. * References: __construct function above * * @return Field Definition */ function get_field_def() { $def = parent::get_field_def(); //set our fields database type $def['dbType'] = 'varchar'; //map our extension fields for colorizing the field $def['url'] = !empty($this->url) ? $this->url : $this->ext1; return $def; }
/** * {@inheritDoc} */ public function get_field_def() { $def = parent::get_field_def(); // The default value is stored in database as string, // however from domain standpoint it has to be boolean // @see Data.Validation#requiredValidator() $def['default'] = isTruthy($def['default']); return $def; }
function get_field_def() { $def = parent::get_field_def(); if (!empty($this->ext4)) { $def['default_value'] = $this->ext4; $def['default'] = $this->ext4; } $def['studio'] = 'visible'; $def['source'] = 'non-db'; $def['dbType'] = isset($this->ext3) ? $this->ext3 : 'text'; return array_merge($def, $this->get_additional_defs()); }
function get_field_def() { $vardef = parent::get_field_def(); $vardef['dbType'] = $this->ext3; return $vardef; }
function get_field_def() { return array_merge(parent::get_field_def(), $this->get_additional_defs()); }