1
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:
le="color: #000000"><?php function getObjectDataTypeList() { return array( 1 => 'XOBJ_DTYPE_TXTBOX', 2 => 'XOBJ_DTYPE_TXTAREA', 3 => 'XOBJ_DTYPE_INT', 4 => 'XOBJ_DTYPE_URL', 5 => 'XOBJ_DTYPE_EMAIL', 6 => 'XOBJ_DTYPE_ARRAY', 7 => 'XOBJ_DTYPE_OTHER', 8 => 'XOBJ_DTYPE_SOURCE', 9 => '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