Exemplo n.º 1
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['dbType'] = 'text';
     $def['massupdate'] = 0;
     $def['importable'] = 0;
     $def['duplicate_merge'] = 0;
     $def['reportable'] = 0;
     //$def['len'] = 1000;
     $def['studio'] = 'visible';
     if (isset($this->ext2) && isset($this->ext3)) {
         $def['width'] = $this->ext2;
         $def['height'] = $this->ext3;
     }
     if (isset($this->ext4)) {
         $def['turn_on'] = $this->ext4;
     }
     if (isset($this->width) && isset($this->height)) {
         $def['width'] = $this->width;
         $def['height'] = $this->height;
     }
     if (isset($this->turn_on)) {
         $def['turn_on'] = $this->turn_on;
     }
     return $def;
 }
Exemplo n.º 2
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['studio'] = 'visible';
     $def['type'] = 'image';
     $def['dbType'] = 'varchar';
     $def['len'] = 255;
     if (isset($this->ext1)) {
         $def['border'] = $this->ext1;
     }
     if (isset($this->ext2)) {
         $def['width'] = $this->ext2;
     }
     if (isset($this->ext3)) {
         $def['height'] = $this->ext3;
     }
     if (isset($this->border)) {
         $def['border'] = $this->border;
     }
     if (isset($this->width)) {
         $def['width'] = $this->width;
     }
     if (isset($this->height)) {
         $def['height'] = $this->height;
     }
     return $def;
 }
Exemplo n.º 3
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['dbType'] = 'varchar';
     $def['studio'] = 'hidden';
     return $def;
 }
Exemplo n.º 4
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['dbType'] = 'varchar';
     $def['studio'] = 'hidden';
     // FIXME this is to match default flex relates vardefs. We need to document the rules.
     $def['group'] = 'parent_name';
     return $def;
 }
Exemplo n.º 5
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     if (!empty($def['default'])) {
         $def['display_default'] = $def['default'];
         $def['default'] = '';
     }
     return $def;
 }
Exemplo n.º 6
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     //$def['options'] = !empty($this->options) ? $this->options : $this->ext1;
     $def['default'] = !empty($this->default) ? $this->default : $this->default_value;
     $def['len'] = $this->len;
     $def['dbType'] = 'varchar';
     $def['gen'] = !empty($this->gen) ? $this->gen : $this->ext3;
     return $def;
 }
Exemplo n.º 7
0
 function get_field_def()
 {
     $vardef = parent::get_field_def();
     $vardef['disable_num_format'] = $this->ext3;
     if (!empty($this->ext2)) {
         $min = !empty($this->ext1) ? $this->ext1 : 0;
         $max = $this->ext2;
         $vardef['validation'] = array('type' => 'range', 'min' => $min, 'max' => $max);
     }
     return $vardef;
 }
Exemplo n.º 8
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     if ($GLOBALS['db']->dbType == 'oracle') {
         $def['dbType'] = 'date';
     } else {
         $def['dbType'] = 'datetime';
     }
     if (!empty($def['default'])) {
         $def['display_default'] = $def['default'];
         $def['default'] = '';
     }
     return $def;
 }
Exemplo n.º 9
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['studio'] = 'visible';
     if (isset($this->ext2) && isset($this->ext3)) {
         $def['rows'] = $this->ext2;
         $def['cols'] = $this->ext3;
     }
     if (isset($this->rows) && isset($this->cols)) {
         $def['rows'] = $this->rows;
         $def['cols'] = $this->cols;
     }
     return $def;
 }
Exemplo n.º 10
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['studio'] = 'visible';
     if (isset($this->ext2) && isset($this->ext3)) {
         $def['rows'] = $this->ext2;
         $def['cols'] = $this->ext3;
     }
     if (isset($this->rows) && isset($this->cols)) {
         $def['rows'] = $this->rows;
         $def['cols'] = $this->cols;
     }
     //handle db type
     $def['dbType'] = 'text';
     //handle fts search
     $def['full_text_search']['type'] = 'text';
     return $def;
 }
Exemplo n.º 11
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['dbType'] = 'varchar';
     $def['massupdate'] = 0;
     $def['importable'] = 0;
     $def['duplicate_merge'] = 0;
     $def['reportable'] = 0;
     $def['len'] = 255;
     $def['studio'] = 'visible';
     //Max Width
     $def['max_width'] = !empty($this->max_width) ? $this->max_width : $this->ext2;
     //Max Height
     $def['max_height'] = !empty($this->max_height) ? $this->max_height : $this->ext3;
     //Style CSS
     $def['style'] = !empty($this->style) ? $this->style : $this->ext4;
     return $def;
 }
Exemplo n.º 12
0
 function get_field_def()
 {
     $vardef = parent::get_field_def();
     $vardef['disable_num_format'] = $this->ext3;
     if (!empty($this->ext2)) {
         $min = !empty($this->ext1) ? $this->ext1 : 0;
         $max = $this->ext2;
         $vardef['validation'] = array('type' => 'range', 'min' => $min, 'max' => $max);
     }
     if (!empty($this->auto_increment)) {
         $vardef['auto_increment'] = $this->auto_increment;
         if (empty($this->autoinc_next) && isset($this->module) && isset($this->module->table_name)) {
             global $db;
             $helper = $db->gethelper();
             $auto = $helper->getAutoIncrement($this->module->table_name, $this->name);
             $this->autoinc_next = $vardef['autoinc_next'] = $auto;
         }
     }
     return $vardef;
 }
Exemplo n.º 13
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['options'] = !empty($this->options) ? $this->options : $this->ext1;
     $def['default'] = !empty($this->default) ? $this->default : $this->default_value;
     $def['len'] = $this->max_size;
     $def['studio'] = 'visible';
     // this class may be extended, so only do the unserialize for genuine TemplateEnums
     if (get_class($this) == 'TemplateEnum' && empty($def['dependency'])) {
         $def['dependency'] = isset($this->ext4) ? unserialize(html_entity_decode($this->ext4)) : null;
     }
     if (!empty($this->visibility_grid)) {
         $def['visibility_grid'] = $this->visibility_grid;
     }
     return $def;
 }
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['id_name'] = $this->ext3;
     $def['ext2'] = $this->ext2;
     $def['module'] = $def['ext2'];
     $def['rname'] = 'name';
     $def['quicksearch'] = 'enabled';
     $def['studio'] = 'visible';
     $def['source'] = 'non-db';
     return $def;
 }
Exemplo n.º 15
0
 /**
  * get array of field's properties
  *
  * @return array
  */
 public function get_field_def()
 {
     $defs = parent::get_field_def();
     $defs['source'] = 'non-db';
     return $defs;
 }
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['id_name'] = $this->ext3;
     $def['ext2'] = $this->ext2;
     $def['module'] = $def['ext2'];
     //Special case for documents, which use a document_name rather than name
     if ($def['module'] == "Documents") {
         $def['rname'] = 'document_name';
     } else {
         $def['rname'] = 'name';
     }
     $def['quicksearch'] = 'enabled';
     $def['studio'] = 'visible';
     $def['source'] = 'non-db';
     return $def;
 }
Exemplo n.º 17
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['precision'] = !empty($this->ext1) ? $this->ext1 : $this->precision;
     return $def;
 }
Exemplo n.º 18
0
 /**
  * get_field_def
  *
  * @see parent::get_field_def
  * This method checks to see if the enable_range_search key/value entry should be
  * added to the vardef entry representing the module
  */
 function get_field_def()
 {
     $vardef = parent::get_field_def();
     if (!empty($this->enable_range_search)) {
         $vardef['enable_range_search'] = $this->enable_range_search;
         $vardef['options'] = $this->type == 'date' || $this->type == 'datetimecombo' || $this->type == 'datetime' ? 'date_range_search_dom' : 'numeric_range_search_dom';
     } else {
         $vardef['enable_range_search'] = false;
     }
     return $vardef;
 }
Exemplo n.º 19
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['precision'] = $this->ext1;
     return $def;
 }
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['id_name'] = $this->ext3;
     // This should pretty much always eval to true, but better safe than sorry
     if (empty($def['ext2'])) {
         // In most cases $this->ext2 will have already been set by either the
         // request or the vardef row from module builder
         $def['ext2'] = empty($this->ext2) ? '' : $this->ext2;
     }
     // Handle setting the related module. In most cases this will be driven
     // by $this->ext2
     if (empty($def['module'])) {
         if (!empty($this->module)) {
             $def['module'] = $this->module;
         } else {
             if (empty($def['ext2']) && !empty($this->ext2)) {
                 $def['ext2'] = $this->ext2;
             }
             $def['module'] = $def['ext2'];
         }
     } else {
         if (empty($def['ext2'])) {
             $def['ext2'] = $def['module'];
         }
         $this->ext2 = $def['ext2'];
     }
     //Special case for documents, which use a document_name rather than name
     if ($def['module'] == "Documents") {
         $def['rname'] = 'document_name';
     } else {
         $def['rname'] = 'name';
     }
     $def['quicksearch'] = 'enabled';
     $def['studio'] = 'visible';
     $def['source'] = 'non-db';
     return $def;
 }
Exemplo n.º 21
0
 function get_field_def()
 {
     $def = parent::get_field_def();
     $def['studio'] = 'visible';
     return $def;
 }