dolibarr 18.0.6
|
Set of function for modulebuilder management. More...
Go to the source code of this file.
Functions | |
rebuildObjectClass ($destdir, $module, $objectname, $newmask, $readdir='', $addfieldentry=array(), $delfieldentry='') | |
Regenerate files .class.php. | |
rebuildObjectSql ($destdir, $module, $objectname, $newmask, $readdir='', $object=null, $moduletype='external') | |
Save data into a memory area shared by all users, all sessions on server. | |
dolGetListOfObjectClasses ($destdir) | |
Get list of existing objects from directory. | |
deletePerms ($file) | |
Delete all permissions. | |
compareFirstValue ($a, $b) | |
Compare two value. | |
reWriteAllPermissions ($file, $permissions, $key, $right, $objectname, $module, $action) | |
Rewriting all permissions after any actions. | |
writePropsInAsciiDoc ($file, $objectname, $destfile) | |
Write all properties of the object in AsciiDoc format. | |
deletePropsFromDoc ($file, $objectname) | |
Delete property from documentation if we delete object. | |
getFromFile ($file, $start, $end) | |
Search a string and return all lines needed from file. | |
writePermsInAsciiDoc ($file, $destfile) | |
Write all permissions of each object in AsciiDoc format. | |
addObjectsToApiFile ($file, $objects, $modulename) | |
Add Object in ModuleApi File. | |
removeObjectFromApiFile ($file, $objectname, $modulename) | |
Remove Object variables and methods from API_Module File. | |
reWriteAllMenus ($file, $menus, $menuWantTo, $key, $action) | |
Set of function for modulebuilder management.
Definition in file modulebuilder.lib.php.
addObjectsToApiFile | ( | $file, | |
$objects, | |||
$modulename ) |
Add Object in ModuleApi File.
string | $file | path of file |
array | $objects | array of objects in the module |
string | $modulename | name of module |
Definition at line 830 of file modulebuilder.lib.php.
References dolReplaceInFile(), and getFromFile().
compareFirstValue | ( | $a, | |
$b ) |
Compare two value.
int | string | $a | value 1 |
int | string | $b | value 2 |
Definition at line 491 of file modulebuilder.lib.php.
deletePerms | ( | $file | ) |
Delete all permissions.
string | $file | file with path |
Definition at line 458 of file modulebuilder.lib.php.
References dolReplaceInFile().
Referenced by reWriteAllPermissions().
deletePropsFromDoc | ( | $file, | |
$objectname ) |
Delete property from documentation if we delete object.
string | $file | file or path |
string | $objectname | name of object wants to deleted |
Definition at line 700 of file modulebuilder.lib.php.
dolGetListOfObjectClasses | ( | $destdir | ) |
Get list of existing objects from directory.
string | $destdir | Directory |
Definition at line 426 of file modulebuilder.lib.php.
References dol_dir_list().
getFromFile | ( | $file, | |
$start, | |||
$end ) |
Search a string and return all lines needed from file.
string | $file | file for searching |
string | $start | start line if exist |
string | $end | end line if exist |
Definition at line 718 of file modulebuilder.lib.php.
Referenced by addObjectsToApiFile(), removeObjectFromApiFile(), reWriteAllMenus(), and writePermsInAsciiDoc().
rebuildObjectClass | ( | $destdir, | |
$module, | |||
$objectname, | |||
$newmask, | |||
$readdir = '', | |||
$addfieldentry = array(), | |||
$delfieldentry = '' ) |
Regenerate files .class.php.
string | $destdir | Directory |
string | $module | Module name |
string | $objectname | Name of object |
string | $newmask | New mask |
string | $readdir | Directory source (use $destdir when not defined) |
string | $addfieldentry | Array of 1 field entry to add array('key'=>,'type'=>,''label'=>,'visible'=>,'enabled'=>,'position'=>,'notnull'=>','index'=>,'searchall'=>,'comment'=>,'help'=>,'isameasure') |
string | $delfieldentry | Id of field to remove |
Definition at line 38 of file modulebuilder.lib.php.
References dol_copy(), dol_is_file(), dol_mkdir(), dol_osencode(), dol_print_error(), dol_sort_array(), dolChmod(), and setEventMessages().
rebuildObjectSql | ( | $destdir, | |
$module, | |||
$objectname, | |||
$newmask, | |||
$readdir = '', | |||
$object = null, | |||
$moduletype = 'external' ) |
Save data into a memory area shared by all users, all sessions on server.
string | $destdir | Directory |
string | $module | Module name |
string | $objectname | Name of object |
string | $newmask | New mask |
string | $readdir | Directory source (use $destdir when not defined) |
Object | $object | If object was already loaded/known, it is pass to avoid another include and new. |
string | $moduletype | 'external' or 'internal' |
Definition at line 255 of file modulebuilder.lib.php.
References dol_copy(), dol_is_file(), dol_mkdir(), dol_osencode(), dolChmod(), and setEventMessages().
removeObjectFromApiFile | ( | $file, | |
$objectname, | |||
$modulename ) |
Remove Object variables and methods from API_Module File.
string | $file | file api module |
string | $objectname | name of object whant to remove |
string | $modulename | name of module |
Definition at line 889 of file modulebuilder.lib.php.
References dolReplaceInFile(), and getFromFile().
reWriteAllMenus | ( | $file, | |
$menus, | |||
$menuWantTo, | |||
$key, | |||
$action ) |
string | $file | path of filename |
mixed | $menus | all menus for module |
mixed | null | $menuWantTo | menu get for do actions |
int | null | $key | key for the concerned menu |
int | $action | for specify what action (0 = delete, 1 = add, 2 = update, -1 = when delete object) |
Definition at line 937 of file modulebuilder.lib.php.
References dolReplaceInFile(), and getFromFile().
reWriteAllPermissions | ( | $file, | |
$permissions, | |||
$key, | |||
$right, | |||
$objectname, | |||
$module, | |||
$action ) |
Rewriting all permissions after any actions.
string | $file | filename or path |
array | $permissions | permissions existing in file |
int | null | $key | key for permission needed |
array | null | $right | $right to update or add |
string | null | $objectname | name of object |
string | null | $module | name of module |
int | $action | 0 for delete, 1 for add, 2 for update, -1 when delete object completly, -2 for generate rights after add |
Definition at line 506 of file modulebuilder.lib.php.
References deletePerms(), and dolReplaceInFile().
writePermsInAsciiDoc | ( | $file, | |
$destfile ) |
Write all permissions of each object in AsciiDoc format.
string | $file | path of the class |
string | $destfile | file where write table of permissions |
Definition at line 746 of file modulebuilder.lib.php.
References dolReplaceInFile(), and getFromFile().
writePropsInAsciiDoc | ( | $file, | |
$objectname, | |||
$destfile ) |
Write all properties of the object in AsciiDoc format.
string | $file | path of the class |
string | $objectname | name of the objectClass |
string | $destfile | file where write table of properties |
Definition at line 625 of file modulebuilder.lib.php.
References dolReplaceInFile().