Skip to content

Instantly share code, notes, and snippets.

@Luke1982
Last active April 23, 2019 14:54
Show Gist options
  • Save Luke1982/dd320f7ddc16d0d3029c829e2a6a6b82 to your computer and use it in GitHub Desktop.
Save Luke1982/dd320f7ddc16d0d3029c829e2a6a6b82 to your computer and use it in GitHub Desktop.
create-ui10-vtlib
require_once 'vtlib/Vtiger/Module.php';

$module 		= Vtiger_Module::getInstance('MODULENAME');
$block 			= Vtiger_Block::getInstance('BLOCKLABEL', $module);

$field 			= new Vtiger_Field();
$field->name 		= 'FIELDNAME';
$field->table 		= 'TABLENAME';
$field->column 		= 'COLUMNNAME';
$field->columntype 	= 'COLUMNTYPE';
$field->uitype 		= UITYPE;
$field->typeofdata 	= 'TYPEOFDATA';

$block->addField($field);
$field->setRelatedModules(array('RELATEDMODULENAME'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment