Added context to all compiler events. Added layout fields override options for dynamic field generation.
This commit is contained in:
@ -800,6 +800,8 @@ class Get
|
||||
$this->langPrefix = 'COM_' . ComponentbuilderHelper::safeString($name_code, 'U');
|
||||
// set component code name
|
||||
$this->componentCodeName = ComponentbuilderHelper::safeString($name_code);
|
||||
// set component context
|
||||
$this->componentContext = $this->componentCodeName . '.' . $this->componentID;
|
||||
// set if placeholders should be added to customcode
|
||||
$global = ((int) ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'add_placeholders') == 1) ? true : false;
|
||||
$this->addPlaceholders = ((int) $config['placeholders'] == 0) ? false : (((int) $config['placeholders'] == 1) ? true : $global);
|
||||
@ -1020,7 +1022,7 @@ class Get
|
||||
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $this->componentID);
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeQueryComponentData
|
||||
$this->triggerEvent('jcb_ce_onBeforeQueryComponentData', array(&$this->componentID, &$query, &$this->db));
|
||||
$this->triggerEvent('jcb_ce_onBeforeQueryComponentData', array(&$this->componentContext, &$this->componentID, &$query, &$this->db));
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$this->db->setQuery($query);
|
||||
@ -1029,7 +1031,7 @@ class Get
|
||||
$component = $this->db->loadObject();
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeModelComponentData
|
||||
$this->triggerEvent('jcb_ce_onBeforeModelComponentData', array(&$component));
|
||||
$this->triggerEvent('jcb_ce_onBeforeModelComponentData', array(&$this->componentContext, &$component));
|
||||
|
||||
// set upater
|
||||
$updater = array(
|
||||
@ -1573,7 +1575,7 @@ class Get
|
||||
}
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterModelComponentData
|
||||
$this->triggerEvent('jcb_ce_onAfterModelComponentData', array(&$component));
|
||||
$this->triggerEvent('jcb_ce_onAfterModelComponentData', array(&$this->componentContext, &$component));
|
||||
|
||||
// return the found component data
|
||||
return $component;
|
||||
@ -1622,7 +1624,7 @@ class Get
|
||||
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeQueryViewData
|
||||
$this->triggerEvent('jcb_ce_onBeforeQueryViewData', array(&$id, &$query, &$this->db));
|
||||
$this->triggerEvent('jcb_ce_onBeforeQueryViewData', array(&$this->componentContext, &$id, &$query, &$this->db));
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$this->db->setQuery($query);
|
||||
@ -1681,7 +1683,7 @@ class Get
|
||||
$this->placeholders[$this->bbb . 'VIEWS' . $this->ddd] = $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh];
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeModelViewData
|
||||
$this->triggerEvent('jcb_ce_onBeforeModelViewData', array(&$view, &$this->placeholders));
|
||||
$this->triggerEvent('jcb_ce_onBeforeModelViewData', array(&$this->componentContext, &$view, &$this->placeholders));
|
||||
|
||||
// add the tables
|
||||
$view->addtables = (isset($view->addtables) && ComponentbuilderHelper::checkJson($view->addtables)) ? json_decode($view->addtables, true) : null;
|
||||
@ -2279,7 +2281,7 @@ class Get
|
||||
}
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterModelViewData
|
||||
$this->triggerEvent('jcb_ce_onAfterModelViewData', array(&$view, &$this->placeholders));
|
||||
$this->triggerEvent('jcb_ce_onAfterModelViewData', array(&$this->componentContext, &$view, &$this->placeholders));
|
||||
|
||||
// clear placeholders
|
||||
unset($this->placeholders[$this->hhh . 'view' . $this->hhh]);
|
||||
@ -2321,7 +2323,7 @@ class Get
|
||||
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeQueryCustomViewData
|
||||
$this->triggerEvent('jcb_ce_onBeforeQueryCustomViewData', array(&$id, &$table, &$query, &$this->db));
|
||||
$this->triggerEvent('jcb_ce_onBeforeQueryCustomViewData', array(&$this->componentContext, &$id, &$table, &$query, &$this->db));
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$this->db->setQuery($query);
|
||||
@ -2330,7 +2332,7 @@ class Get
|
||||
$view = $this->db->loadObject();
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeModelCustomViewData
|
||||
$this->triggerEvent('jcb_ce_onBeforeModelCustomViewData', array(&$view, &$id, &$table));
|
||||
$this->triggerEvent('jcb_ce_onBeforeModelCustomViewData', array(&$this->componentContext, &$view, &$id, &$table));
|
||||
|
||||
if ($table === 'site_view')
|
||||
{
|
||||
@ -2570,7 +2572,7 @@ class Get
|
||||
}
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterModelCustomViewData
|
||||
$this->triggerEvent('jcb_ce_onAfterModelCustomViewData', array(&$view));
|
||||
$this->triggerEvent('jcb_ce_onAfterModelCustomViewData', array(&$this->componentContext, &$view));
|
||||
|
||||
// return the found view data
|
||||
return $view;
|
||||
@ -2601,7 +2603,7 @@ class Get
|
||||
$query->where($this->db->quoteName('a.id') . ' = ' . $this->db->quote($id));
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeQueryFieldData
|
||||
$this->triggerEvent('jcb_ce_onBeforeQueryFieldData', array(&$id, &$query, &$this->db));
|
||||
$this->triggerEvent('jcb_ce_onBeforeQueryFieldData', array(&$this->componentContext, &$id, &$query, &$this->db));
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$this->db->setQuery($query);
|
||||
@ -2612,7 +2614,7 @@ class Get
|
||||
$field = $this->db->loadObject();
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeModelFieldData
|
||||
$this->triggerEvent('jcb_ce_onBeforeModelFieldData', array(&$field));
|
||||
$this->triggerEvent('jcb_ce_onBeforeModelFieldData', array(&$this->componentContext, &$field));
|
||||
|
||||
// adding a fix for the changed name of type to fieldtype
|
||||
$field->type = $field->fieldtype;
|
||||
@ -2690,7 +2692,7 @@ class Get
|
||||
$field->history = $this->getHistoryWatch('field', $id);
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterModelFieldData
|
||||
$this->triggerEvent('jcb_ce_onAfterModelFieldData', array(&$field));
|
||||
$this->triggerEvent('jcb_ce_onAfterModelFieldData', array(&$this->componentContext, &$field));
|
||||
|
||||
$this->_fieldData[$id] = $field;
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ class Structure extends Get
|
||||
// set the Joomla Version Data
|
||||
$this->joomlaVersionData = $this->setJoomlaVersionData();
|
||||
// Trigger Event: jcb_ce_onAfterSetJoomlaVersionData
|
||||
$this->triggerEvent('jcb_ce_onAfterSetJoomlaVersionData', array(&$this->joomlaVersionData));
|
||||
$this->triggerEvent('jcb_ce_onAfterSetJoomlaVersionData', array(&$this->componentContext, &$this->joomlaVersionData));
|
||||
// set the dashboard
|
||||
$this->setDynamicDashboard();
|
||||
// set the new folders
|
||||
@ -419,7 +419,7 @@ class Structure extends Get
|
||||
if (ComponentbuilderHelper::checkArray($this->libraries))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onBeforeSetLibaries
|
||||
$this->triggerEvent('jcb_ce_onBeforeSetLibaries', array(&$this->libraries));
|
||||
$this->triggerEvent('jcb_ce_onBeforeSetLibaries', array(&$this->componentContext, &$this->libraries));
|
||||
// creat the main component folder
|
||||
if (!JFolder::exists($this->componentPath))
|
||||
{
|
||||
|
@ -457,14 +457,14 @@ class Fields extends Structure
|
||||
// set the custom table key
|
||||
$dbkey = 'g';
|
||||
// Trigger Event: jcb_ce_onBeforeBuildFields
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$this->componentContext, &$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
|
||||
// TODO we should add the global and local view switch if field for front end
|
||||
foreach ($view['settings']->fields as $field)
|
||||
{
|
||||
$dynamicFields .= $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true);
|
||||
}
|
||||
// Trigger Event: jcb_ce_onAfterBuildFields
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$this->componentContext, &$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
|
||||
// set the default fields
|
||||
$fieldSet = array();
|
||||
$fieldSet[] = '<fieldset name="details">';
|
||||
@ -729,14 +729,14 @@ class Fields extends Structure
|
||||
// set the custom table key
|
||||
$dbkey = 'g';
|
||||
// Trigger Event: jcb_ce_onBeforeBuildFields
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
|
||||
// TODO we should add the global and local view switch if field for front end
|
||||
foreach ($view['settings']->fields as $field)
|
||||
{
|
||||
$dynamicFieldsXML[] = $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true);
|
||||
}
|
||||
// Trigger Event: jcb_ce_onAfterBuildFields
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
|
||||
// set the default fields
|
||||
$XML = new simpleXMLElement('<a/>');
|
||||
$fieldSetXML = $XML->addChild('fieldset');
|
||||
@ -2013,7 +2013,7 @@ class Fields extends Structure
|
||||
{
|
||||
$this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']][(int) $field['order_edit']] = $name;
|
||||
}
|
||||
// check if publishing fields were over written
|
||||
// check if default fields were over written
|
||||
if (in_array($name, $this->defaultFields))
|
||||
{
|
||||
// just to eliminate
|
||||
@ -2055,7 +2055,7 @@ class Fields extends Structure
|
||||
{
|
||||
$this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']][(int) $field['order_edit']] = $name;
|
||||
}
|
||||
// check if publishing fields were over written
|
||||
// check if default fields were over written
|
||||
if (in_array($name, $this->defaultFields))
|
||||
{
|
||||
// just to eliminate
|
||||
|
@ -6539,7 +6539,7 @@ class Interpretation extends Fields
|
||||
// add final list of needed lang strings
|
||||
$componentName = JFilterOutput::cleanText($this->componentData->name);
|
||||
// Trigger Event: jcb_ce_onBeforeBuildAdminLang
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAdminLang', array(&$this->langContent['admin'], &$this->langPrefix, &$componentName));
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAdminLang', array(&$this->componentContext, &$this->langContent['admin'], &$this->langPrefix, &$componentName));
|
||||
// start loding the defaults
|
||||
$this->langContent['adminsys'][$this->langPrefix] = $componentName;
|
||||
$this->langContent['adminsys'][$this->langPrefix . '_CONFIGURATION'] = $componentName . ' Configuration';
|
||||
@ -6631,7 +6631,7 @@ class Interpretation extends Fields
|
||||
if (isset($this->langContent['admin']) && ComponentbuilderHelper::checkArray($this->langContent['admin']))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onAfterBuildAdminLang
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminLang', array(&$this->langContent['admin'], &$this->langPrefix, &$componentName));
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminLang', array(&$this->componentContext, &$this->langContent['admin'], &$this->langPrefix, &$componentName));
|
||||
// sort the strings
|
||||
ksort($this->langContent['admin']);
|
||||
// load to global languages
|
||||
@ -6649,7 +6649,7 @@ class Interpretation extends Fields
|
||||
// add final list of needed lang strings
|
||||
$componentName = JFilterOutput::cleanText($this->componentData->name);
|
||||
// Trigger Event: jcb_ce_onBeforeBuildSiteLang
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildSiteLang', array(&$this->langContent['site'], &$this->langPrefix, &$componentName));
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildSiteLang', array(&$this->componentContext, &$this->langContent['site'], &$this->langPrefix, &$componentName));
|
||||
// add final list of needed lang strings
|
||||
$this->langContent['site'][$this->langPrefix] = $componentName;
|
||||
// some more defaults
|
||||
@ -6691,7 +6691,7 @@ class Interpretation extends Fields
|
||||
if (isset($this->langContent['site']) && ComponentbuilderHelper::checkArray($this->langContent['site']))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onAfterBuildSiteLang
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildSiteLang', array(&$this->langContent['site'], &$this->langPrefix, &$componentName));
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildSiteLang', array(&$this->componentContext, &$this->langContent['site'], &$this->langPrefix, &$componentName));
|
||||
// sort the strings
|
||||
ksort($this->langContent['site']);
|
||||
// load to global languages
|
||||
@ -6709,7 +6709,7 @@ class Interpretation extends Fields
|
||||
// add final list of needed lang strings
|
||||
$componentName = JFilterOutput::cleanText($this->componentData->name);
|
||||
// Trigger Event: jcb_ce_onBeforeBuildSiteSysLang
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildSiteSysLang', array(&$this->langContent['sitesys'], &$this->langPrefix, &$componentName));
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildSiteSysLang', array(&$this->componentContext, &$this->langContent['sitesys'], &$this->langPrefix, &$componentName));
|
||||
// add final list of needed lang strings
|
||||
$this->langContent['sitesys'][$this->langPrefix] = $componentName;
|
||||
$this->langContent['sitesys'][$this->langPrefix . '_NO_ACCESS_GRANTED'] = "No Access Granted!";
|
||||
@ -6726,7 +6726,7 @@ class Interpretation extends Fields
|
||||
if (isset($this->langContent['sitesys']) && ComponentbuilderHelper::checkArray($this->langContent['sitesys']))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onAfterBuildSiteSysLang
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildSiteSysLang', array(&$this->langContent['sitesys'], &$this->langPrefix, &$componentName));
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildSiteSysLang', array(&$this->componentContext, &$this->langContent['sitesys'], &$this->langPrefix, &$componentName));
|
||||
// sort strings
|
||||
ksort($this->langContent['sitesys']);
|
||||
// load to global languages
|
||||
@ -6744,7 +6744,7 @@ class Interpretation extends Fields
|
||||
// add final list of needed lang strings
|
||||
$componentName = JFilterOutput::cleanText($this->componentData->name);
|
||||
// Trigger Event: jcb_ce_onBeforeBuildAdminSysLang
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAdminSysLang', array(&$this->langContent['adminsys'], &$this->langPrefix, &$componentName));
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAdminSysLang', array(&$this->componentContext, &$this->langContent['adminsys'], &$this->langPrefix, &$componentName));
|
||||
// check if the both admin array is set
|
||||
if (isset($this->langContent['bothadmin']) && ComponentbuilderHelper::checkArray($this->langContent['bothadmin']))
|
||||
{
|
||||
@ -6756,7 +6756,7 @@ class Interpretation extends Fields
|
||||
if (isset($this->langContent['adminsys']) && ComponentbuilderHelper::checkArray($this->langContent['adminsys']))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onAfterBuildAdminSysLang
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminSysLang', array(&$this->langContent['adminsys'], &$this->langPrefix, &$componentName));
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminSysLang', array(&$this->componentContext, &$this->langContent['adminsys'], &$this->langPrefix, &$componentName));
|
||||
// sort strings
|
||||
ksort($this->langContent['adminsys']);
|
||||
// load to global languages
|
||||
@ -7482,6 +7482,46 @@ class Interpretation extends Fields
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* set Tabs Layouts Fields Array
|
||||
*
|
||||
* @param string $view_name_single The single view name
|
||||
*
|
||||
* @return string The array
|
||||
*
|
||||
*/
|
||||
public function getTabLayoutFieldsArray($view_name_single)
|
||||
{
|
||||
// check if the load build is set for this view
|
||||
if (isset($this->layoutBuilder[$view_name_single]) && ComponentbuilderHelper::checkArray($this->layoutBuilder[$view_name_single]))
|
||||
{
|
||||
$layoutArray = array();
|
||||
foreach ($this->layoutBuilder[$view_name_single] as $layout => $alignments)
|
||||
{
|
||||
// sort the alignments
|
||||
ksort($alignments);
|
||||
$alignmentArray= array();
|
||||
foreach ($alignments as $alignment => $fields)
|
||||
{
|
||||
// sort the fields
|
||||
ksort($fields);
|
||||
$fieldArray= array();
|
||||
foreach ($fields as $field)
|
||||
{
|
||||
// add each field
|
||||
$fieldArray[] = PHP_EOL . $this->_t(4) . "'" . $field . "'";
|
||||
}
|
||||
// add the alignemnt key
|
||||
$alignmentArray[] = PHP_EOL . $this->_t(3) . "'" . $this->alignmentOptions[$alignment] . "' => array(" . implode(',', $fieldArray) . PHP_EOL . $this->_t(3) . ")";
|
||||
}
|
||||
// add the layout key
|
||||
$layoutArray[] = PHP_EOL . $this->_t(2) . "'" . ComponentbuilderHelper::safeString($layout) . "' => array(" . implode(',', $alignmentArray) . PHP_EOL . $this->_t(2) . ")";
|
||||
}
|
||||
return 'array(' . implode(',', $layoutArray) . PHP_EOL . $this->_t(1) . ")";
|
||||
}
|
||||
return 'array()';
|
||||
}
|
||||
|
||||
/**
|
||||
* set Edit Body
|
||||
*
|
||||
@ -14022,7 +14062,7 @@ class Interpretation extends Fields
|
||||
// set the custom table key
|
||||
$dbkey = 'g';
|
||||
// Trigger Event: jcb_ce_onBeforeSetConfigFieldsets
|
||||
$this->triggerEvent('jcb_ce_onBeforeSetConfigFieldsets', array(&$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$placeholders));
|
||||
$this->triggerEvent('jcb_ce_onBeforeSetConfigFieldsets', array(&$this->componentContext, &$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$placeholders));
|
||||
// build the config fields
|
||||
foreach ($this->componentData->config as $field)
|
||||
{
|
||||
@ -14078,7 +14118,7 @@ class Interpretation extends Fields
|
||||
elseif (2 == $timer) // this is after the admin views are build
|
||||
{
|
||||
// Trigger Event: jcb_ce_onBeforeSetConfigFieldsets
|
||||
$this->triggerEvent('jcb_ce_onBeforeSetConfigFieldsets', array(&$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$this->placeholders));
|
||||
$this->triggerEvent('jcb_ce_onBeforeSetConfigFieldsets', array(&$this->componentContext, &$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$this->placeholders));
|
||||
// these field sets can only be added after admin view is build
|
||||
$this->setGroupControlConfigFieldsets($lang);
|
||||
// these can be added anytime really (but looks best after groups
|
||||
@ -14090,7 +14130,7 @@ class Interpretation extends Fields
|
||||
$this->setCustomControlConfigFieldsets($lang);
|
||||
}
|
||||
// Trigger Event: jcb_ce_onAfterSetConfigFieldsets
|
||||
$this->triggerEvent('jcb_ce_onAfterSetConfigFieldsets', array(&$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->extensionsParams, &$this->frontEndParams, &$this->placeholders));
|
||||
$this->triggerEvent('jcb_ce_onAfterSetConfigFieldsets', array(&$this->componentContext, &$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->extensionsParams, &$this->frontEndParams, &$this->placeholders));
|
||||
}
|
||||
|
||||
public function setSiteControlConfigFieldsets($lang)
|
||||
|
@ -69,7 +69,7 @@ class Infusion extends Interpretation
|
||||
if (isset($this->componentData->admin_views) && ComponentbuilderHelper::checkArray($this->componentData->admin_views))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onBeforeBuildFilesContent
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildFilesContent', array(&$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
|
||||
|
||||
// COMPONENT
|
||||
$this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] = $this->placeholders[$this->hhh . 'COMPONENT' . $this->hhh];
|
||||
@ -276,7 +276,7 @@ class Infusion extends Interpretation
|
||||
$this->setLockLicensePer($viewName_list, $this->target);
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAdminEditViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh));
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAdminEditViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh));
|
||||
|
||||
// FIELDSETS <<<DYNAMIC>>>
|
||||
$this->fileContentDynamic[$viewName_single][$this->hhh . 'FIELDSETS' . $this->hhh] = $this->setFieldSet($view, $this->componentCodeName, $viewName_single, $viewName_list);
|
||||
@ -377,8 +377,11 @@ class Infusion extends Interpretation
|
||||
}
|
||||
}
|
||||
|
||||
// TABLAYOUTFIELDSARRAY <<<DYNAMIC>>> add the tab layout fields array to the model
|
||||
$this->fileContentDynamic[$viewName_single][$this->hhh . 'TABLAYOUTFIELDSARRAY' . $this->hhh] = $this->getTabLayoutFieldsArray($viewName_single);
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterBuildAdminEditViewContent
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminEditViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh));
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminEditViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh));
|
||||
}
|
||||
// set the views names
|
||||
if (isset($view['settings']->name_list) && $view['settings']->name_list != 'null')
|
||||
@ -389,7 +392,7 @@ class Infusion extends Interpretation
|
||||
$this->fileContentDynamic[$viewName_list][$this->hhh . 'ICOMOON' . $this->hhh] = $view['icomoon'];
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeBuildAdminListViewContent
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAdminListViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh));
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAdminListViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh));
|
||||
|
||||
// set the export/import option
|
||||
if (isset($view['port']) && $view['port'] || 1 == $view['settings']->add_custom_import)
|
||||
@ -522,7 +525,7 @@ class Infusion extends Interpretation
|
||||
}
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterBuildAdminListViewContent
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminListViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh));
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminListViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh));
|
||||
}
|
||||
|
||||
// set u fields used in batch
|
||||
@ -605,7 +608,7 @@ class Infusion extends Interpretation
|
||||
$this->fileContentStatic[$this->hhh . 'HELPER_EXEL' . $this->hhh] = $this->setExelHelperMethods();
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterBuildAdminViewContent
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildAdminViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
|
||||
}
|
||||
|
||||
// setup custom_admin_views and all needed stuff for the site
|
||||
@ -651,7 +654,7 @@ class Infusion extends Interpretation
|
||||
$this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd] = $view['settings']->CODE;
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeBuildCustomAdminViewContent
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildCustomAdminViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildCustomAdminViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
|
||||
|
||||
// set license per view if needed
|
||||
$this->setLockLicensePer($view['settings']->code, $this->target);
|
||||
@ -705,7 +708,7 @@ class Infusion extends Interpretation
|
||||
$this->setCustomViewTemplateBody($view);
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterBuildCustomAdminViewContent
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildCustomAdminViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildCustomAdminViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
|
||||
}
|
||||
|
||||
// setup the layouts
|
||||
@ -872,7 +875,7 @@ class Infusion extends Interpretation
|
||||
$this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd] = $view['settings']->CODE;
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeBuildSiteViewContent
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildSiteViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildSiteViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
|
||||
|
||||
// set license per view if needed
|
||||
$this->setLockLicensePer($view['settings']->code, $this->target);
|
||||
@ -956,7 +959,7 @@ class Infusion extends Interpretation
|
||||
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_BOTTOM_FORM' . $this->hhh] = $this->setCustomViewForm($view['settings']->code, 2);
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterBuildSiteViewContent
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildSiteViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildSiteViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
|
||||
}
|
||||
// setup the layouts
|
||||
$this->setCustomViewLayouts();
|
||||
@ -1042,7 +1045,7 @@ class Infusion extends Interpretation
|
||||
}
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterBuildFilesContent
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildFilesContent', array(&$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
|
||||
$this->triggerEvent('jcb_ce_onAfterBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1172,7 +1175,7 @@ class Infusion extends Interpretation
|
||||
if (ComponentbuilderHelper::checkArray($this->languages))
|
||||
{
|
||||
// Trigger Event: jcb_ce_onBeforeBuildAllLangFiles
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAllLangFiles', array(&$this->languages, &$this->langTag));
|
||||
$this->triggerEvent('jcb_ce_onBeforeBuildAllLangFiles', array(&$this->componentContext, &$this->languages, &$this->langTag));
|
||||
// rest xml array
|
||||
$langXML = array();
|
||||
foreach ($this->languages as $tag => $areas)
|
||||
|
Reference in New Issue
Block a user