<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body smarttemplateinserted="true" text="#000000" bgcolor="#FFFFFF">
Dear vtiger Team,<br>
<br>
If I understand well the entity modules of vtiger system (in 6.1)
create & modify a new vtiger entity (for example: Contacts,
Leads, or CustomEntity in a Custom entity module) during run.<br>
The extension modules do not create new crm entities, but extend the
functionality of existing entity modules.<br>
<br>
In my case I would like to extend the functionality of my <b>CustomModule</b>.<br>
<br>
If I will create a new extension module for this purpose, then this
(extension) module will create a new directory to place its files.<br>
ref.:
<a class="moz-txt-link-freetext" href="http://community.vtiger.com/help/vtigercrm/developers/extensions/examples/extension-module.html">http://community.vtiger.com/help/vtigercrm/developers/extensions/examples/extension-module.html</a><br>
For example the extension module files will be placed in the <br>
<vtiger_crm>/<br>
modules/<br>
my_extension_module/<br>
directory and the all objects of the extension module (classes,
methods and properties) will be named by that name <b><my_extension_module</b><b>></b>.<br>
<br>
<b>How and when will be triggered these extension methods to extend
functionality of the existing CustomModule?</b><br>
<br>
I have found that the only way to trigger the <b>my_extension_module->methods</b>
is to place some code - like this below - to the CustomModule files
in the proper places:<br>
<blockquote>$adb = PearDatabase::getInstance();<br>
$em = new VTEventsManager($adb);<br>
$data = array();<br>
//init data for the Custom Events<br>
$data = ..... ;<br>
$em->triggerEvent('vtiger.customextensionmodules.customevent',
$data);<br>
</blockquote>
In this case the event is always triggered during the executing of
the CustomModule function, but the extending function will be
executed only that case if the <br>
(1) my_extension_module is installed;<br>
(2) the eventhadler is registered for the event:
vtiger.customextensionmodules.customevent<br>
(3) the handler file, handler class is provided in the file
MyExtensionModuleHandler.php<br>
<br>
<b>Do I understand well the original intent of the vtiger structure?</b><br>
<br>
In some case would be better if the extension (add-on function) is
in the directory structure of the CustomModule.<br>
It is easy to provide with FTP upload to the <br>
<vtiger_crm>/modules/CustomModule/ or<br>
<vtiger_crm>/modules/CustomModule/models or <br>
<vtiger_crm>/modules/CustomModule/helpers directory and
the class autoloader will do its job, the methods, properties will
be available for the CustomModule to extend it.<br>
<br>
<b>But how to use this simple extending method in vtiger store? </b><br>
<br>
<b>Is there any method to install </b><b>add-on files via zip
packages to the defined place to extend an existing entity module?</b><br>
<br>
Kindest regards:<br>
István<br>
<br>
<div class="moz-signature">-- <br>
üdvözlettel:<br>
<br>
<b>Holbok István</b><br>
<br>
+3670-342-0900<br>
<b>e-mail:</b> <a class="moz-txt-link-abbreviated" href="mailto:holbok@gmail.com">holbok@gmail.com</a><br>
<b>SkyPe:</b> holboki<br>
<br>
</div>
</body>
</html>