1
irmtfan
Core feature: Create XoopsList for XoopsObject Types
  • 2013/4/7 10:05

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


zyspec sent this feature request to sf.net
https://sourceforge.net/p/xoops/feature-requests/415/

Quote:

It would be useful for module developers to be able to get a list of valid XoopsObject data types. This will facilitate the ability to create dynamic dB fields without the module having to create a list of the current XoopsObject datatypes in the module. (and trying to keep it current with the latest version of the core. A method something like XoopsLists::getObjectDataTypeList() could then return an array:
function getObjectDataTypeList()
{
return array( 
=> 'XOBJ_DTYPE_TXTBOX',
              
=> 'XOBJ_DTYPE_TXTAREA',
              
=> 'XOBJ_DTYPE_INT',
              
=> 'XOBJ_DTYPE_URL',
              
=> 'XOBJ_DTYPE_EMAIL',
              
=> 'XOBJ_DTYPE_ARRAY',
              
=> 'XOBJ_DTYPE_OTHER',
              
=> 'XOBJ_DTYPE_SOURCE',
              
=> 'XOBJ_DTYPE_STIME',
             
10 => 'XOBJ_DTYPE_MTIME',
             
11 => 'XOBJ_DTYPE_LTIME',
             
13 => 'XOBJ_DTYPE_FLOAT',
             
14 => 'XOBJ_DTYPE_DECIMAL',
             
15 => 'XOBJ_DTYPE_ENUM');
}

This could also be used when the core creates XoopsObject instead of having it defined at the beginning of the ./kernel/object.php class file.


i want to discuss it here
It is a good feature to add but it is useless for now because there is not any function/class in core to work with database tables/table fields.

I mean we need to ALTER/CHANGE/SHOW/CREATE/RENAME database tables and table fields using core functions.

see one example here:
https://xoops.org/modules/newbb/viewtopic.php?topic_id=75979

Login

Who's Online

384 user(s) are online (280 user(s) are browsing Support Forums)


Members: 0


Guests: 384


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits