2016-02-26 00:20:09 +00:00
|
|
|
<?php
|
2018-05-18 06:28:27 +00:00
|
|
|
/**
|
|
|
|
* @package Joomla.Component.Builder
|
|
|
|
*
|
|
|
|
* @created 30th April, 2015
|
|
|
|
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
|
|
|
|
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
2020-03-28 13:34:14 +00:00
|
|
|
* @copyright Copyright (C) 2015 - 2020 Vast Development Method. All rights reserved.
|
2018-05-18 06:28:27 +00:00
|
|
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
|
|
|
*/
|
2016-02-26 00:20:09 +00:00
|
|
|
|
|
|
|
// No direct access to this file
|
|
|
|
defined('_JEXEC') or die('Restricted access');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interpretation class
|
|
|
|
*/
|
|
|
|
class Infusion extends Interpretation
|
|
|
|
{
|
2017-02-13 23:24:38 +00:00
|
|
|
public $langFiles = array();
|
2017-01-20 00:16:50 +00:00
|
|
|
public $removeSiteFolder = false;
|
2018-08-07 12:25:26 +00:00
|
|
|
public $removeSiteEditFolder = true;
|
2016-05-04 04:53:33 +00:00
|
|
|
|
2016-02-26 00:20:09 +00:00
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*/
|
2017-12-14 23:10:47 +00:00
|
|
|
public function __construct($config = array())
|
2016-02-26 00:20:09 +00:00
|
|
|
{
|
|
|
|
// first we run the perent constructor
|
|
|
|
if (parent::__construct($config))
|
|
|
|
{
|
|
|
|
// infuse the data into the structure
|
2016-06-23 15:05:37 +00:00
|
|
|
return $this->buildFileContent();
|
2016-02-26 00:20:09 +00:00
|
|
|
}
|
2020-03-28 13:34:14 +00:00
|
|
|
|
2016-02-26 00:20:09 +00:00
|
|
|
return false;
|
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2016-09-03 21:44:47 +00:00
|
|
|
/**
|
|
|
|
* Set the line number in comments
|
2020-03-28 13:34:14 +00:00
|
|
|
*
|
|
|
|
* @param int $nr The line number
|
|
|
|
*
|
2016-09-03 21:44:47 +00:00
|
|
|
* @return void
|
2020-03-28 13:34:14 +00:00
|
|
|
*
|
2016-09-03 21:44:47 +00:00
|
|
|
*/
|
|
|
|
private function setLine($nr)
|
|
|
|
{
|
2017-04-06 08:47:51 +00:00
|
|
|
if ($this->debugLinenr)
|
2016-09-03 21:44:47 +00:00
|
|
|
{
|
2017-12-14 23:10:47 +00:00
|
|
|
return ' [Infusion ' . $nr . ']';
|
2016-09-03 21:44:47 +00:00
|
|
|
}
|
2020-03-28 13:34:14 +00:00
|
|
|
|
2016-09-03 21:44:47 +00:00
|
|
|
return '';
|
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2016-03-04 00:01:43 +00:00
|
|
|
/**
|
2016-03-01 18:44:13 +00:00
|
|
|
* Build the content for the structure
|
2020-03-28 13:34:14 +00:00
|
|
|
*
|
2016-03-01 18:44:13 +00:00
|
|
|
*
|
|
|
|
* @return boolean on success
|
2020-03-28 13:34:14 +00:00
|
|
|
*
|
2016-03-01 18:44:13 +00:00
|
|
|
*/
|
2016-02-26 00:20:09 +00:00
|
|
|
protected function buildFileContent()
|
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($this->componentData->admin_views)
|
|
|
|
&& ComponentbuilderHelper::checkArray(
|
|
|
|
$this->componentData->admin_views
|
|
|
|
))
|
2016-02-26 00:20:09 +00:00
|
|
|
{
|
2019-06-22 10:43:26 +00:00
|
|
|
// Trigger Event: jcb_ce_onBeforeBuildFilesContent
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onBeforeBuildFilesContent',
|
|
|
|
array(&$this->componentContext, &$this->componentData,
|
|
|
|
&$this->fileContentStatic, &$this->fileContentDynamic,
|
|
|
|
&$this->placeholders, &$this->hhh)
|
|
|
|
);
|
2019-06-22 10:43:26 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// COMPONENT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh]
|
|
|
|
= $this->placeholders[$this->hhh . 'COMPONENT' . $this->hhh];
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// Component
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'Component' . $this->hhh]
|
|
|
|
= $this->placeholders[$this->hhh . 'Component' . $this->hhh];
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// component
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]
|
|
|
|
= $this->placeholders[$this->hhh . 'component' . $this->hhh];
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// COMPANYNAME
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'COMPANYNAME' . $this->hhh]
|
|
|
|
= trim(
|
|
|
|
JFilterOutput::cleanText($this->componentData->companyname)
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CREATIONDATE
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'CREATIONDATE' . $this->hhh]
|
|
|
|
= JFactory::getDate($this->componentData->created)->format(
|
|
|
|
'jS F, Y'
|
|
|
|
);
|
|
|
|
$this->fileContentStatic[$this->hhh . 'CREATIONDATE' . $this->hhh
|
|
|
|
. 'GLOBAL']
|
|
|
|
= $this->fileContentStatic[$this->hhh . 'CREATIONDATE'
|
|
|
|
. $this->hhh];
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// BUILDDATE
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'BUILDDATE' . $this->hhh]
|
|
|
|
= JFactory::getDate()->format('jS F, Y');
|
|
|
|
$this->fileContentStatic[$this->hhh . 'BUILDDATE' . $this->hhh
|
|
|
|
. 'GLOBAL']
|
|
|
|
= $this->fileContentStatic[$this->hhh . 'BUILDDATE'
|
|
|
|
. $this->hhh];
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// AUTHOR
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'AUTHOR' . $this->hhh] = trim(
|
|
|
|
JFilterOutput::cleanText($this->componentData->author)
|
|
|
|
);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// AUTHOREMAIL
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'AUTHOREMAIL' . $this->hhh]
|
|
|
|
= trim($this->componentData->email);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// AUTHORWEBSITE
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'AUTHORWEBSITE' . $this->hhh]
|
|
|
|
= trim($this->componentData->website);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// COPYRIGHT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'COPYRIGHT' . $this->hhh]
|
|
|
|
= trim($this->componentData->copyright);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// LICENSE
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'LICENSE' . $this->hhh]
|
|
|
|
= trim($this->componentData->license);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// VERSION
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh]
|
|
|
|
= trim($this->componentData->component_version);
|
2017-11-06 14:04:23 +00:00
|
|
|
// set the actual global version
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ACTUALVERSION' . $this->hhh]
|
|
|
|
= $this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh];
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2017-11-06 14:04:23 +00:00
|
|
|
// do some Tweaks to the version based on selected options
|
2020-03-28 13:34:14 +00:00
|
|
|
if (strpos(
|
|
|
|
$this->fileContentStatic[$this->hhh . 'VERSION'
|
|
|
|
. $this->hhh], '.'
|
|
|
|
) !== false)
|
2017-11-06 14:04:23 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$versionArray = explode(
|
|
|
|
'.', $this->fileContentStatic[$this->hhh . 'VERSION'
|
|
|
|
. $this->hhh]
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
2017-11-06 14:04:23 +00:00
|
|
|
// load only first two values
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($versionArray)
|
|
|
|
&& ComponentbuilderHelper::checkArray(
|
|
|
|
$versionArray
|
|
|
|
)
|
|
|
|
&& $this->componentData->mvc_versiondate == 2)
|
2017-11-06 14:04:23 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh]
|
|
|
|
= $versionArray[0] . '.' . $versionArray[1] . '.x';
|
2017-11-06 14:04:23 +00:00
|
|
|
}
|
|
|
|
// load only the first value
|
2020-03-28 13:34:14 +00:00
|
|
|
elseif (isset($versionArray)
|
|
|
|
&& ComponentbuilderHelper::checkArray(
|
|
|
|
$versionArray
|
|
|
|
)
|
|
|
|
&& $this->componentData->mvc_versiondate == 3)
|
2017-11-06 14:04:23 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh]
|
|
|
|
= $versionArray[0] . '.x.x';
|
2017-11-06 14:04:23 +00:00
|
|
|
}
|
|
|
|
unset($versionArray);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2017-11-06 14:04:23 +00:00
|
|
|
// set the global version in case
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh
|
|
|
|
. 'GLOBAL']
|
|
|
|
= $this->fileContentStatic[$this->hhh . 'VERSION' . $this->hhh];
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// Component_name
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'Component_name' . $this->hhh]
|
|
|
|
= JFilterOutput::cleanText($this->componentData->name);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// SHORT_DISCRIPTION
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'SHORT_DESCRIPTION'
|
|
|
|
. $this->hhh]
|
|
|
|
= trim(
|
|
|
|
JFilterOutput::cleanText(
|
|
|
|
$this->componentData->short_description
|
|
|
|
)
|
|
|
|
);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// DESCRIPTION
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'DESCRIPTION' . $this->hhh]
|
|
|
|
= trim($this->componentData->description);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// COMP_IMAGE_TYPE
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'COMP_IMAGE_TYPE'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->setComponentImageType($this->componentData->image);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// ACCESS_SECTIONS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ACCESS_SECTIONS'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->setAccessSections();
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CONFIG_FIELDSETS
|
2020-03-28 13:34:14 +00:00
|
|
|
$keepLang = $this->lang;
|
2016-02-26 00:20:09 +00:00
|
|
|
$this->lang = 'admin';
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2017-03-06 12:06:51 +00:00
|
|
|
// start loading the category tree scripts
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'CATEGORY_CLASS_TREES'
|
|
|
|
. $this->hhh]
|
|
|
|
= '';
|
2016-02-26 00:20:09 +00:00
|
|
|
// run the field sets for first time
|
|
|
|
$this->setConfigFieldsets(1);
|
|
|
|
$this->lang = $keepLang;
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// ADMINJS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ADMINJS' . $this->hhh]
|
|
|
|
= $this->setPlaceholders(
|
|
|
|
$this->customScriptBuilder['component_js'], $this->placeholders
|
|
|
|
);
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITEJS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'SITEJS' . $this->hhh]
|
|
|
|
= $this->setPlaceholders(
|
|
|
|
$this->customScriptBuilder['component_js'], $this->placeholders
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// ADMINCSS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ADMINCSS' . $this->hhh]
|
|
|
|
= $this->setPlaceholders(
|
|
|
|
$this->customScriptBuilder['component_css_admin'],
|
|
|
|
$this->placeholders
|
|
|
|
);
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITECSS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'SITECSS' . $this->hhh]
|
|
|
|
= $this->setPlaceholders(
|
|
|
|
$this->customScriptBuilder['component_css_site'],
|
|
|
|
$this->placeholders
|
|
|
|
);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_HELPER_SCRIPT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'CUSTOM_HELPER_SCRIPT'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->setPlaceholders(
|
|
|
|
$this->customScriptBuilder['component_php_helper_admin'],
|
|
|
|
$this->placeholders
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// BOTH_CUSTOM_HELPER_SCRIPT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'BOTH_CUSTOM_HELPER_SCRIPT'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->setPlaceholders(
|
|
|
|
$this->customScriptBuilder['component_php_helper_both'],
|
|
|
|
$this->placeholders
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// ADMIN_GLOBAL_EVENT_HELPER
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT_HELPER'
|
|
|
|
. $this->hhh]
|
|
|
|
= '';
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// ADMIN_GLOBAL_EVENT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT'
|
|
|
|
. $this->hhh]
|
|
|
|
= '';
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2016-02-26 00:20:09 +00:00
|
|
|
// now load the data for the global event if needed
|
|
|
|
if ($this->componentData->add_admin_event == 1)
|
|
|
|
{
|
2018-05-22 19:01:36 +00:00
|
|
|
// ADMIN_GLOBAL_EVENT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT'
|
|
|
|
. $this->hhh]
|
|
|
|
= PHP_EOL . PHP_EOL . '// Triger the Global Admin Event';
|
|
|
|
$this->fileContentStatic[$this->hhh . 'ADMIN_GLOBAL_EVENT'
|
|
|
|
. $this->hhh]
|
|
|
|
.= PHP_EOL . $this->fileContentStatic[$this->hhh
|
|
|
|
. 'Component' . $this->hhh]
|
|
|
|
. 'Helper::globalEvent($document);';
|
2018-05-22 19:01:36 +00:00
|
|
|
// ADMIN_GLOBAL_EVENT_HELPER
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
= PHP_EOL . PHP_EOL . $this->_t(1) . '/**';
|
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
.= PHP_EOL . $this->_t(1)
|
|
|
|
. '* The Global Admin Event Method.';
|
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
.= PHP_EOL . $this->_t(1) . '**/';
|
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
.= PHP_EOL . $this->_t(1)
|
|
|
|
. 'public static function globalEvent($document)';
|
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
.= PHP_EOL . $this->_t(1) . '{';
|
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
.= PHP_EOL . $this->setPlaceholders(
|
|
|
|
$this->customScriptBuilder['component_php_admin_event'],
|
|
|
|
$this->placeholders
|
|
|
|
);
|
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'ADMIN_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
.= PHP_EOL . $this->_t(1) . '}';
|
2016-02-26 00:20:09 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2016-10-23 22:48:26 +00:00
|
|
|
// now load the readme file if needed
|
|
|
|
if ($this->componentData->addreadme == 1)
|
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'EXSTRA_ADMIN_FILES'
|
|
|
|
. $this->hhh]
|
|
|
|
.= PHP_EOL . $this->_t(3)
|
|
|
|
. "<filename>README.txt</filename>";
|
2016-10-23 22:48:26 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// HELPER_CREATEUSER
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'HELPER_CREATEUSER'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->setCreateUserHelperMethod(
|
|
|
|
$this->componentData->creatuserhelper
|
|
|
|
);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// HELP
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'HELP' . $this->hhh]
|
|
|
|
= $this->noHelp();
|
2018-05-22 19:01:36 +00:00
|
|
|
// HELP_SITE
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'HELP_SITE' . $this->hhh]
|
|
|
|
= $this->noHelp();
|
2016-02-26 00:20:09 +00:00
|
|
|
|
|
|
|
// build route parse switch
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTER_PARSE_SWITCH'
|
|
|
|
. $this->hhh]
|
|
|
|
= '';
|
2016-02-26 00:20:09 +00:00
|
|
|
// build route views
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
|
|
|
|
. $this->hhh]
|
|
|
|
= '';
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2016-04-22 12:03:43 +00:00
|
|
|
// add the helper emailer if set
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'HELPER_EMAIL' . $this->hhh]
|
|
|
|
= $this->addEmailHelper();
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2019-02-15 22:03:21 +00:00
|
|
|
// load the global placeholders
|
|
|
|
if (ComponentbuilderHelper::checkArray($this->globalPlaceholders))
|
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
foreach (
|
|
|
|
$this->globalPlaceholders as $globalPlaceholder =>
|
|
|
|
$gloabalValue
|
|
|
|
)
|
2019-02-15 22:03:21 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$globalPlaceholder]
|
|
|
|
= $gloabalValue;
|
2019-02-15 22:03:21 +00:00
|
|
|
}
|
|
|
|
}
|
2016-09-11 15:27:04 +00:00
|
|
|
// reset view array
|
2020-03-28 13:34:14 +00:00
|
|
|
$viewarray = array();
|
2017-12-14 23:10:47 +00:00
|
|
|
$site_edit_view_array = array();
|
|
|
|
// start dynamic build
|
|
|
|
foreach ($this->componentData->admin_views as $view)
|
|
|
|
{
|
2017-03-06 12:06:51 +00:00
|
|
|
// set the target
|
2017-12-14 23:10:47 +00:00
|
|
|
$this->target = 'admin';
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->lang = 'admin';
|
2018-01-19 10:27:47 +00:00
|
|
|
|
2020-11-17 04:06:34 +00:00
|
|
|
// set local names
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode = $view['settings']->name_single_code;
|
|
|
|
$nameListCode = $view['settings']->name_list_code;
|
2018-01-19 10:27:47 +00:00
|
|
|
|
|
|
|
// set the view placeholders
|
|
|
|
$this->setViewPlaceholders($view['settings']);
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// set site edit view array
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($view['edit_create_site_view'])
|
|
|
|
&& is_numeric(
|
|
|
|
$view['edit_create_site_view']
|
|
|
|
)
|
|
|
|
&& $view['edit_create_site_view'] > 0)
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$site_edit_view_array[] = $this->_t(4) . "'"
|
2020-11-26 17:33:39 +00:00
|
|
|
. $nameSingleCode . "'";
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->lang = 'both';
|
2018-08-07 12:25:26 +00:00
|
|
|
// insure site view does not get removed
|
|
|
|
$this->removeSiteEditFolder = false;
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
|
|
|
// check if help is being loaded
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->checkHelp($nameSingleCode);
|
2017-12-14 23:10:47 +00:00
|
|
|
// set custom admin view list links
|
2020-11-17 04:06:34 +00:00
|
|
|
$this->setCustomAdminViewListLink(
|
2020-11-26 17:33:39 +00:00
|
|
|
$view, $nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
|
|
|
// set view array
|
2020-11-17 04:06:34 +00:00
|
|
|
$viewarray[] = $this->_t(4) . "'"
|
2020-11-26 17:33:39 +00:00
|
|
|
. $nameSingleCode . "' => '"
|
|
|
|
. $nameListCode . "'";
|
2017-12-14 23:10:47 +00:00
|
|
|
// set the view names
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($view['settings']->name_single)
|
|
|
|
&& $view['settings']->name_single != 'null')
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
|
|
|
// set license per view if needed
|
2020-11-17 04:06:34 +00:00
|
|
|
$this->setLockLicensePer(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode, $this->target
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
|
|
|
$this->setLockLicensePer(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode, $this->target
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2019-06-22 10:43:26 +00:00
|
|
|
// Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onBeforeBuildAdminEditViewContent',
|
|
|
|
array(&$this->componentContext, &$view,
|
2020-11-26 17:33:39 +00:00
|
|
|
&$nameSingleCode,
|
|
|
|
&$nameListCode,
|
2020-03-28 13:34:14 +00:00
|
|
|
&$this->fileContentStatic,
|
2020-11-26 17:33:39 +00:00
|
|
|
&$this->fileContentDynamic[$nameSingleCode],
|
2020-03-28 13:34:14 +00:00
|
|
|
&$this->placeholders, &$this->hhh)
|
|
|
|
);
|
2019-06-22 10:43:26 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// FIELDSETS <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'FIELDSETS' . $this->hhh]
|
|
|
|
= $this->setFieldSet(
|
2020-11-17 04:06:34 +00:00
|
|
|
$view, $this->componentCodeName,
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// ACCESSCONTROL <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'ACCESSCONTROL' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setFieldSetAccessControl(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// LINKEDVIEWITEMS <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'LINKEDVIEWITEMS' . $this->hhh]
|
|
|
|
= '';
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// ADDTOOLBAR <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'ADDTOOLBAR' . $this->hhh]
|
|
|
|
= $this->setAddToolBar($view);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
|
|
|
// set the script for this view
|
|
|
|
$this->buildTheViewScript($view);
|
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// VIEW_SCRIPT
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'VIEW_SCRIPT' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setViewScript(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode, 'fileScript'
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// EDITBODYSCRIPT
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'EDITBODYSCRIPT' . $this->hhh]
|
|
|
|
= $this->setViewScript(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode, 'footerScript'
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// AJAXTOKE <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'AJAXTOKE' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setAjaxToke(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// DOCUMENT_CUSTOM_PHP <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
if ($phpDocument = $this->getCustomScriptBuilder(
|
2020-11-26 17:33:39 +00:00
|
|
|
'php_document', $nameSingleCode,
|
2020-11-17 04:06:34 +00:00
|
|
|
PHP_EOL, null, true,
|
2020-03-28 13:34:14 +00:00
|
|
|
false
|
|
|
|
))
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'DOCUMENT_CUSTOM_PHP' . $this->hhh]
|
|
|
|
= str_replace(
|
|
|
|
'$document->', '$this->document->', $phpDocument
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
// clear some memory
|
2018-04-18 19:11:14 +00:00
|
|
|
unset($phpDocument);
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'DOCUMENT_CUSTOM_PHP' . $this->hhh]
|
|
|
|
= '';
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
2018-05-22 19:01:36 +00:00
|
|
|
// LINKEDVIEWTABLESCRIPTS <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'LINKEDVIEWTABLESCRIPTS' . $this->hhh]
|
|
|
|
= '';
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// VALIDATEFIX <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'VALIDATIONFIX' . $this->hhh]
|
|
|
|
= $this->setValidationFix(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'Component'
|
|
|
|
. $this->hhh]
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// EDITBODY <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'EDITBODY' . $this->hhh]
|
|
|
|
= $this->setEditBody($view);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2020-11-29 03:43:24 +00:00
|
|
|
// EDITBODYFADEIN <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'EDITBODYFADEIN' . $this->hhh]
|
|
|
|
= $this->setFadeInEfect($view);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// JTABLECONSTRUCTOR <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JTABLECONSTRUCTOR' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setJtableConstructor(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// JTABLEALIASCATEGORY <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JTABLEALIASCATEGORY' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setJtableAliasCategory(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// METHOD_GET_ITEM <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'METHOD_GET_ITEM' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setMethodGetItem(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// LINKEDVIEWGLOBAL <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'LINKEDVIEWGLOBAL' . $this->hhh]
|
|
|
|
= '';
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// LINKEDVIEWMETHODS <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'LINKEDVIEWMETHODS' . $this->hhh]
|
|
|
|
= '';
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// JMODELADMIN_BEFORE_DELETE <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JMODELADMIN_BEFORE_DELETE' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
2020-11-17 04:06:34 +00:00
|
|
|
'php_before_delete',
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode, PHP_EOL
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// JMODELADMIN_AFTER_DELETE <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JMODELADMIN_AFTER_DELETE' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
2020-11-26 17:33:39 +00:00
|
|
|
'php_after_delete', $nameSingleCode,
|
2020-11-17 04:06:34 +00:00
|
|
|
PHP_EOL . PHP_EOL
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// JMODELADMIN_BEFORE_DELETE <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JMODELADMIN_BEFORE_PUBLISH' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
2020-11-17 04:06:34 +00:00
|
|
|
'php_before_publish',
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode, PHP_EOL
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// JMODELADMIN_AFTER_DELETE <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JMODELADMIN_AFTER_PUBLISH' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
2020-11-17 04:06:34 +00:00
|
|
|
'php_after_publish',
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode, PHP_EOL . PHP_EOL
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CHECKBOX_SAVE <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'CHECKBOX_SAVE' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setCheckboxSave(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// METHOD_ITEM_SAVE <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'METHOD_ITEM_SAVE' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setMethodItemSave(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// POSTSAVEHOOK <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'POSTSAVEHOOK' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
2020-11-26 17:33:39 +00:00
|
|
|
'php_postsavehook', $nameSingleCode,
|
2020-11-17 04:06:34 +00:00
|
|
|
PHP_EOL, null,
|
2020-03-28 13:34:14 +00:00
|
|
|
true, PHP_EOL . $this->_t(2) . "return;",
|
|
|
|
PHP_EOL . PHP_EOL . $this->_t(2) . "return;"
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// VIEWCSS <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'VIEWCSS' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
2020-11-26 17:33:39 +00:00
|
|
|
'css_view', $nameSingleCode, '',
|
2020-11-17 04:06:34 +00:00
|
|
|
null, true
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2018-04-18 19:11:14 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// add css to front end
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($view['edit_create_site_view'])
|
|
|
|
&& is_numeric(
|
|
|
|
$view['edit_create_site_view']
|
|
|
|
)
|
|
|
|
&& $view['edit_create_site_view'] > 0)
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'SITE_VIEWCSS' . $this->hhh]
|
2020-11-26 17:33:39 +00:00
|
|
|
= $this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'VIEWCSS' . $this->hhh];
|
2019-04-09 21:54:54 +00:00
|
|
|
// check if we should add a create menu
|
|
|
|
if ($view['edit_create_site_view'] == 2)
|
|
|
|
{
|
|
|
|
// SITE_MENU_XML <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'SITE_MENU_XML' . $this->hhh]
|
|
|
|
= $this->setAdminViewMenu(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode, $view
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2019-04-09 21:54:54 +00:00
|
|
|
}
|
2020-11-29 00:00:20 +00:00
|
|
|
// SITE_ADMIN_VIEW_CONTROLLER_HEADER <<<DYNAMIC>>> add the header details for the controller
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-10-26 20:30:51 +00:00
|
|
|
. 'SITE_ADMIN_VIEW_CONTROLLER_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
2020-11-17 04:06:34 +00:00
|
|
|
'site.admin.view.controller',
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-10-26 20:30:51 +00:00
|
|
|
);
|
2020-10-21 03:10:19 +00:00
|
|
|
// SITE_ADMIN_VIEW_MODEL_HEADER <<<DYNAMIC>>> add the header details for the model
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-10-21 03:10:19 +00:00
|
|
|
. 'SITE_ADMIN_VIEW_MODEL_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
2020-11-17 04:06:34 +00:00
|
|
|
'site.admin.view.model',
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-10-21 03:10:19 +00:00
|
|
|
);
|
2020-11-29 00:00:20 +00:00
|
|
|
// SITE_ADMIN_VIEW_HEADER <<<DYNAMIC>>> add the header details for the view
|
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
|
|
|
. 'SITE_ADMIN_VIEW_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
|
|
|
'site.admin.view',
|
|
|
|
$nameSingleCode
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
2019-06-22 10:43:26 +00:00
|
|
|
|
2019-07-01 16:10:28 +00:00
|
|
|
// TABLAYOUTFIELDSARRAY <<<DYNAMIC>>> add the tab layout fields array to the model
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'TABLAYOUTFIELDSARRAY' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->getTabLayoutFieldsArray(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2019-07-01 16:10:28 +00:00
|
|
|
|
2020-11-29 00:00:20 +00:00
|
|
|
// ADMIN_VIEW_CONTROLLER_HEADER <<<DYNAMIC>>> add the header details for the controller
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-10-26 20:30:51 +00:00
|
|
|
. 'ADMIN_VIEW_CONTROLLER_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
2020-11-17 04:06:34 +00:00
|
|
|
'admin.view.controller',
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-10-26 20:30:51 +00:00
|
|
|
);
|
2020-10-21 03:10:19 +00:00
|
|
|
// ADMIN_VIEW_MODEL_HEADER <<<DYNAMIC>>> add the header details for the model
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-10-21 03:10:19 +00:00
|
|
|
. 'ADMIN_VIEW_MODEL_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
2020-11-26 17:33:39 +00:00
|
|
|
'admin.view.model', $nameSingleCode
|
2020-10-21 03:10:19 +00:00
|
|
|
);
|
2020-11-29 00:00:20 +00:00
|
|
|
// ADMIN_VIEW_HEADER <<<DYNAMIC>>> add the header details for the view
|
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
|
|
|
. 'ADMIN_VIEW_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
|
|
|
'admin.view', $nameSingleCode
|
|
|
|
);
|
2020-10-21 03:10:19 +00:00
|
|
|
|
2019-06-22 10:43:26 +00:00
|
|
|
// Trigger Event: jcb_ce_onAfterBuildAdminEditViewContent
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onAfterBuildAdminEditViewContent',
|
|
|
|
array(&$this->componentContext, &$view,
|
2020-11-26 17:33:39 +00:00
|
|
|
&$nameSingleCode,
|
|
|
|
&$nameListCode,
|
2020-03-28 13:34:14 +00:00
|
|
|
&$this->fileContentStatic,
|
2020-11-26 17:33:39 +00:00
|
|
|
&$this->fileContentDynamic[$nameSingleCode],
|
2020-03-28 13:34:14 +00:00
|
|
|
&$this->placeholders, &$this->hhh)
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
|
|
|
// set the views names
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($view['settings']->name_list)
|
|
|
|
&& $view['settings']->name_list != 'null')
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
|
|
|
$this->lang = 'admin';
|
2018-01-19 10:27:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// ICOMOON <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'ICOMOON' . $this->hhh]
|
|
|
|
= $view['icomoon'];
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2019-06-22 10:43:26 +00:00
|
|
|
// Trigger Event: jcb_ce_onBeforeBuildAdminListViewContent
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onBeforeBuildAdminListViewContent',
|
|
|
|
array(&$this->componentContext, &$view,
|
2020-11-26 17:33:39 +00:00
|
|
|
&$nameSingleCode,
|
|
|
|
&$nameListCode,
|
2020-03-28 13:34:14 +00:00
|
|
|
&$this->fileContentStatic,
|
2020-11-26 17:33:39 +00:00
|
|
|
&$this->fileContentDynamic[$nameListCode],
|
2020-03-28 13:34:14 +00:00
|
|
|
&$this->placeholders, &$this->hhh)
|
|
|
|
);
|
2019-06-22 10:43:26 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// set the export/import option
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($view['port']) && $view['port']
|
|
|
|
|| 1 == $view['settings']->add_custom_import)
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->eximportView[$nameListCode]
|
2020-11-17 04:06:34 +00:00
|
|
|
= true;
|
2017-12-14 23:10:47 +00:00
|
|
|
if (1 == $view['settings']->add_custom_import)
|
|
|
|
{
|
|
|
|
// this view has custom import scripting
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->importCustomScripts[$nameListCode]
|
2020-11-17 04:06:34 +00:00
|
|
|
= true;
|
2020-04-19 00:48:23 +00:00
|
|
|
// set all custom scripts
|
2020-11-17 04:06:34 +00:00
|
|
|
$this->setImportCustomScripts(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->eximportView[$nameListCode]
|
2020-11-17 04:06:34 +00:00
|
|
|
= false;
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
|
|
|
|
2020-04-19 00:48:23 +00:00
|
|
|
// set Auto check in function
|
2017-12-14 23:10:47 +00:00
|
|
|
if (isset($view['checkin']) && $view['checkin'] == 1)
|
|
|
|
{
|
2018-05-22 19:01:36 +00:00
|
|
|
// AUTOCHECKIN <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'AUTOCHECKIN' . $this->hhh]
|
|
|
|
= $this->setAutoCheckin(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
2020-11-17 04:06:34 +00:00
|
|
|
$this->componentCodeName
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2018-05-22 19:01:36 +00:00
|
|
|
// CHECKINCALL <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'CHECKINCALL' . $this->hhh]
|
|
|
|
= $this->setCheckinCall();
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-05-22 19:01:36 +00:00
|
|
|
// AUTOCHECKIN <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'AUTOCHECKIN' . $this->hhh]
|
|
|
|
= '';
|
2018-05-22 19:01:36 +00:00
|
|
|
// CHECKINCALL <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'CHECKINCALL' . $this->hhh]
|
|
|
|
= '';
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
2019-03-06 20:32:16 +00:00
|
|
|
// admin list file contnet
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'ADMIN_JAVASCRIPT_FILE' . $this->hhh]
|
|
|
|
= $this->setViewScript(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode, 'list_fileScript'
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2018-05-22 19:01:36 +00:00
|
|
|
// ADMIN_CUSTOM_BUTTONS_LIST
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'ADMIN_CUSTOM_BUTTONS_LIST' . $this->hhh]
|
|
|
|
= $this->setCustomButtons($view, 3, $this->_t(1));
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'ADMIN_CUSTOM_FUNCTION_ONLY_BUTTONS_LIST' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setFunctionOnlyButtons(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// GET_ITEMS_METHOD_STRING_FIX <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'GET_ITEMS_METHOD_STRING_FIX' . $this->hhh]
|
|
|
|
= $this->setGetItemsMethodStringFix(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode,
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'Component'
|
|
|
|
. $this->hhh]
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// GET_ITEMS_METHOD_AFTER_ALL <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'GET_ITEMS_METHOD_AFTER_ALL' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
2020-11-17 04:06:34 +00:00
|
|
|
'php_getitems_after_all',
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode, PHP_EOL
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// SELECTIONTRANSLATIONFIX <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'SELECTIONTRANSLATIONFIX' . $this->hhh]
|
|
|
|
= $this->setSelectionTranslationFix(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode,
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'Component'
|
|
|
|
. $this->hhh]
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// SELECTIONTRANSLATIONFIXFUNC <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'SELECTIONTRANSLATIONFIXFUNC' . $this->hhh]
|
|
|
|
= $this->setSelectionTranslationFixFunc(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode,
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'Component'
|
|
|
|
. $this->hhh]
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// FILTER_FIELDS <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'FILTER_FIELDS' . $this->hhh]
|
2020-11-29 00:00:20 +00:00
|
|
|
= $this->setFilterFieldsArray(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// STOREDID <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'STOREDID' . $this->hhh]
|
2020-11-26 17:33:39 +00:00
|
|
|
= $this->setStoredId($nameListCode);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// POPULATESTATE <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'POPULATESTATE' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setPopulateState(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode, $nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// SORTFIELDS <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'SORTFIELDS' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setSortFields(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CATEGORY_VIEWS
|
2020-03-28 13:34:14 +00:00
|
|
|
if (!isset(
|
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'ROUTER_CATEGORY_VIEWS' . $this->hhh]
|
|
|
|
))
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'ROUTER_CATEGORY_VIEWS' . $this->hhh]
|
|
|
|
= '';
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'ROUTER_CATEGORY_VIEWS' . $this->hhh]
|
|
|
|
.= $this->setRouterCategoryViews(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2020-11-29 00:00:20 +00:00
|
|
|
// FILTERFIELDDISPLAYHELPER <<<DYNAMIC>>>
|
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
|
|
|
. 'FILTERFIELDDISPLAYHELPER' . $this->hhh]
|
|
|
|
= $this->setFilterFieldSidebarDisplayHelper(
|
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
|
|
|
);
|
|
|
|
|
|
|
|
// BATCHDISPLAYHELPER <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-11-29 00:00:20 +00:00
|
|
|
. 'BATCHDISPLAYHELPER' . $this->hhh]
|
|
|
|
= $this->setBatchDisplayHelper(
|
|
|
|
$nameSingleCode,
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// FILTERFUNCTIONS <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'FILTERFUNCTIONS' . $this->hhh]
|
2020-11-29 00:00:20 +00:00
|
|
|
= $this->setFilterFieldHelper(
|
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
|
|
|
);
|
|
|
|
|
|
|
|
// FIELDFILTERSETS <<<DYNAMIC>>>
|
|
|
|
$this->fileContentDynamic['filter_'
|
|
|
|
. $nameListCode][$this->hhh
|
|
|
|
. 'FIELDFILTERSETS' . $this->hhh]
|
|
|
|
= $this->setFieldFilterSet(
|
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
|
|
|
);
|
|
|
|
|
|
|
|
// FIELDLISTSETS <<<DYNAMIC>>>
|
|
|
|
$this->fileContentDynamic['filter_'
|
|
|
|
. $nameListCode][$this->hhh
|
|
|
|
. 'FIELDLISTSETS' . $this->hhh]
|
|
|
|
= $this->setFieldFilterListSet(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// LISTQUERY <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'LISTQUERY' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setListQuery(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// MODELEXPORTMETHOD <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'MODELEXPORTMETHOD' . $this->hhh]
|
|
|
|
= $this->setGetItemsModelMethod(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// MODELEXIMPORTMETHOD <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'CONTROLLEREXIMPORTMETHOD' . $this->hhh]
|
|
|
|
= $this->setControllerEximportMethod(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// EXPORTBUTTON <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'EXPORTBUTTON' . $this->hhh]
|
|
|
|
= $this->setExportButton(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// IMPORTBUTTON <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'IMPORTBUTTON' . $this->hhh]
|
|
|
|
= $this->setImportButton(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2020-11-29 03:43:24 +00:00
|
|
|
// VIEWS_DEFAULT_BODY <<<DYNAMIC>>>
|
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
|
|
|
. 'VIEWS_DEFAULT_BODY' . $this->hhh]
|
|
|
|
= $this->setDefaultViewsBody(
|
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
|
|
|
);
|
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// LISTHEAD <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'LISTHEAD' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setListHead(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// LISTBODY <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'LISTBODY' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setListBody(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// LISTCOLNR <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'LISTCOLNR' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setListColnr(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// JVIEWLISTCANDO <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JVIEWLISTCANDO' . $this->hhh]
|
|
|
|
= $this->setJviewListCanDo(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// VIEWSCSS <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'VIEWSCSS' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
2020-11-26 17:33:39 +00:00
|
|
|
'css_views', $nameSingleCode, '',
|
2020-11-17 04:06:34 +00:00
|
|
|
null, true
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2018-04-18 19:11:14 +00:00
|
|
|
|
2020-05-22 00:32:58 +00:00
|
|
|
// ADMIN_DIPLAY_METHOD <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-05-22 00:32:58 +00:00
|
|
|
. 'ADMIN_DIPLAY_METHOD' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setAdminViewDisplayMethod(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2020-05-22 00:32:58 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// VIEWS_FOOTER_SCRIPT <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$scriptNote = PHP_EOL . '//' . $this->setLine(__LINE__)
|
2020-11-26 17:33:39 +00:00
|
|
|
. ' ' . $nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
. ' footer script';
|
2020-11-26 17:33:39 +00:00
|
|
|
if (($footerScript = $this->getCustomScriptBuilder(
|
|
|
|
'views_footer', $nameSingleCode, '',
|
|
|
|
$scriptNote, true,
|
|
|
|
false, PHP_EOL
|
2020-11-29 03:43:24 +00:00
|
|
|
)) !== false
|
|
|
|
&& ComponentbuilderHelper::checkString($footerScript))
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
2018-04-18 19:11:14 +00:00
|
|
|
// only minfy if no php is added to the footer script
|
2020-03-28 13:34:14 +00:00
|
|
|
if ($this->minify
|
|
|
|
&& strpos($footerScript, '<?php') === false)
|
2018-04-18 19:11:14 +00:00
|
|
|
{
|
|
|
|
// minfy the script
|
|
|
|
$minifier = new JS;
|
|
|
|
$minifier->add($footerScript);
|
|
|
|
$footerScript = $minifier->minify();
|
|
|
|
// clear some memory
|
|
|
|
unset($minifier);
|
|
|
|
}
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'VIEWS_FOOTER_SCRIPT' . $this->hhh]
|
|
|
|
= PHP_EOL . '<script type="text/javascript">'
|
|
|
|
. $footerScript . "</script>";
|
2017-12-14 23:10:47 +00:00
|
|
|
// clear some memory
|
2018-04-18 19:11:14 +00:00
|
|
|
unset($footerScript);
|
2018-04-18 12:03:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'VIEWS_FOOTER_SCRIPT' . $this->hhh]
|
|
|
|
= '';
|
2018-04-18 12:03:07 +00:00
|
|
|
}
|
2019-06-22 10:43:26 +00:00
|
|
|
|
2020-11-29 00:00:20 +00:00
|
|
|
// ADMIN_VIEWS_CONTROLLER_HEADER <<<DYNAMIC>>> add the header details for the controller
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-10-26 20:30:51 +00:00
|
|
|
. 'ADMIN_VIEWS_CONTROLLER_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
2020-11-17 04:06:34 +00:00
|
|
|
'admin.views.controller',
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode
|
2020-10-26 20:30:51 +00:00
|
|
|
);
|
2020-10-21 03:10:19 +00:00
|
|
|
// ADMIN_VIEWS_MODEL_HEADER <<<DYNAMIC>>> add the header details for the model
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-10-21 03:10:19 +00:00
|
|
|
. 'ADMIN_VIEWS_MODEL_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
2020-11-26 17:33:39 +00:00
|
|
|
'admin.views.model', $nameListCode
|
2020-10-21 03:10:19 +00:00
|
|
|
);
|
2020-11-29 00:00:20 +00:00
|
|
|
// ADMIN_VIEWS_HEADER <<<DYNAMIC>>> add the header details for the views
|
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
|
|
|
. 'ADMIN_VIEWS_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
|
|
|
'admin.views', $nameListCode
|
|
|
|
);
|
2020-10-21 03:10:19 +00:00
|
|
|
|
2019-06-22 10:43:26 +00:00
|
|
|
// Trigger Event: jcb_ce_onAfterBuildAdminListViewContent
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onAfterBuildAdminListViewContent',
|
|
|
|
array(&$this->componentContext, &$view,
|
2020-11-26 17:33:39 +00:00
|
|
|
&$nameSingleCode,
|
|
|
|
&$nameListCode,
|
2020-03-28 13:34:14 +00:00
|
|
|
&$this->fileContentStatic,
|
2020-11-26 17:33:39 +00:00
|
|
|
&$this->fileContentDynamic[$nameListCode],
|
2020-03-28 13:34:14 +00:00
|
|
|
&$this->placeholders, &$this->hhh)
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// set u fields used in batch
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'UNIQUEFIELDS' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setUniqueFields(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// TITLEALIASFIX <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'TITLEALIASFIX' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setAliasTitleFix(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// GENERATENEWTITLE <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'GENERATENEWTITLE' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setGenerateNewTitle(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2018-05-02 23:12:06 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// GENERATENEWALIAS <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'GENERATENEWALIAS' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setGenerateNewAlias(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// MODEL_BATCH_COPY <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'MODEL_BATCH_COPY' . $this->hhh]
|
2020-11-26 17:33:39 +00:00
|
|
|
= $this->setBatchCopy($nameSingleCode);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// MODEL_BATCH_MOVE <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'MODEL_BATCH_MOVE' . $this->hhh]
|
2020-11-26 17:33:39 +00:00
|
|
|
= $this->setBatchMove($nameSingleCode);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// BATCH_ONCLICK_CANCEL_SCRIPT <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'BATCH_ONCLICK_CANCEL_SCRIPT' . $this->hhh]
|
|
|
|
= ''; // TODO <-- must still be build
|
2019-06-12 20:06:19 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// JCONTROLLERFORM_ALLOWADD <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JCONTROLLERFORM_ALLOWADD' . $this->hhh]
|
|
|
|
= $this->setJcontrollerAllowAdd(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2019-06-12 20:06:19 +00:00
|
|
|
// JCONTROLLERFORM_BEFORECANCEL <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JCONTROLLERFORM_BEFORECANCEL' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
2020-11-26 17:33:39 +00:00
|
|
|
'php_before_cancel', $nameSingleCode,
|
2020-11-17 04:06:34 +00:00
|
|
|
PHP_EOL, null, null,
|
2020-03-28 13:34:14 +00:00
|
|
|
''
|
|
|
|
);
|
2019-06-12 20:06:19 +00:00
|
|
|
|
2019-06-12 20:36:05 +00:00
|
|
|
// JCONTROLLERFORM_AFTERCANCEL <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JCONTROLLERFORM_AFTERCANCEL' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
2020-11-26 17:33:39 +00:00
|
|
|
'php_after_cancel', $nameSingleCode,
|
2020-11-17 04:06:34 +00:00
|
|
|
PHP_EOL, null, null,
|
2020-03-28 13:34:14 +00:00
|
|
|
''
|
|
|
|
);
|
2019-06-12 20:36:05 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// JCONTROLLERFORM_ALLOWEDIT <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JCONTROLLERFORM_ALLOWEDIT' . $this->hhh]
|
|
|
|
= $this->setJcontrollerAllowEdit(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// JMODELADMIN_GETFORM <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JMODELADMIN_GETFORM' . $this->hhh]
|
|
|
|
= $this->setJmodelAdminGetForm(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// JMODELADMIN_ALLOWEDIT <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JMODELADMIN_ALLOWEDIT' . $this->hhh]
|
|
|
|
= $this->setJmodelAdminAllowEdit(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// JMODELADMIN_CANDELETE <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JMODELADMIN_CANDELETE' . $this->hhh]
|
|
|
|
= $this->setJmodelAdminCanDelete(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// JMODELADMIN_CANEDITSTATE <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'JMODELADMIN_CANEDITSTATE' . $this->hhh]
|
|
|
|
= $this->setJmodelAdminCanEditState(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
|
|
|
// set custom admin view Toolbare buttons
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_DYNAMIC_BUTTONS <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'CUSTOM_ADMIN_DYNAMIC_BUTTONS' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $this->setCustomAdminDynamicButton(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_DYNAMIC_BUTTONS_CONTROLLER <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh
|
2020-03-28 13:34:14 +00:00
|
|
|
. 'CUSTOM_ADMIN_DYNAMIC_BUTTONS_CONTROLLER' . $this->hhh]
|
|
|
|
= $this->setCustomAdminDynamicButtonController(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
|
|
|
// set helper router
|
2020-03-28 13:34:14 +00:00
|
|
|
if (!isset(
|
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTEHELPER'
|
|
|
|
. $this->hhh]
|
|
|
|
))
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTEHELPER'
|
|
|
|
. $this->hhh]
|
|
|
|
= '';
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTEHELPER'
|
|
|
|
. $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
.= $this->setRouterHelp(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2020-03-28 13:34:14 +00:00
|
|
|
|
|
|
|
if (isset($view['edit_create_site_view'])
|
|
|
|
&& is_numeric(
|
|
|
|
$view['edit_create_site_view']
|
|
|
|
)
|
|
|
|
&& $view['edit_create_site_view'] > 0)
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
|
|
|
// add needed router stuff for front edit views
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTER_PARSE_SWITCH'
|
|
|
|
. $this->hhh]
|
|
|
|
.= $this->routerParseSwitch(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode, null, false
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
|
|
|
|
. $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
.= $this->routerBuildViews(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode
|
2020-11-17 04:06:34 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// ACCESS_SECTIONS
|
2020-03-28 13:34:14 +00:00
|
|
|
if (!isset(
|
|
|
|
$this->fileContentStatic[$this->hhh . 'ACCESS_SECTIONS'
|
|
|
|
. $this->hhh]
|
|
|
|
))
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ACCESS_SECTIONS'
|
|
|
|
. $this->hhh]
|
|
|
|
= '';
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ACCESS_SECTIONS'
|
|
|
|
. $this->hhh]
|
|
|
|
.= $this->setAccessSectionsCategory(
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode,
|
|
|
|
$nameListCode
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2018-08-23 01:37:42 +00:00
|
|
|
// set the Joomla Fields ACCESS section if needed
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($view['joomla_fields'])
|
|
|
|
&& $view['joomla_fields'] == 1)
|
2018-08-23 01:37:42 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ACCESS_SECTIONS'
|
|
|
|
. $this->hhh]
|
|
|
|
.= $this->setAccessSectionsJoomlaFields();
|
2018-08-23 01:37:42 +00:00
|
|
|
}
|
2020-04-19 00:48:23 +00:00
|
|
|
|
2019-06-22 10:43:26 +00:00
|
|
|
// Trigger Event: jcb_ce_onAfterBuildAdminViewContent
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onAfterBuildAdminViewContent',
|
2020-11-17 04:06:34 +00:00
|
|
|
array(&$this->componentContext, &$view,
|
2020-11-26 17:33:39 +00:00
|
|
|
&$nameSingleCode,
|
|
|
|
&$nameListCode,
|
2020-11-17 04:06:34 +00:00
|
|
|
&$this->fileContentStatic,
|
2020-03-28 13:34:14 +00:00
|
|
|
&$this->fileContentDynamic, &$this->placeholders,
|
|
|
|
&$this->hhh)
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
|
|
|
|
2020-06-25 19:22:30 +00:00
|
|
|
// setup the layouts
|
|
|
|
$this->setCustomViewLayouts();
|
|
|
|
|
2020-04-19 00:48:23 +00:00
|
|
|
// ADMIN_HELPER_CLASS_HEADER
|
|
|
|
$this->fileContentStatic[$this->hhh . 'ADMIN_HELPER_CLASS_HEADER'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->setHelperClassHeader('admin');
|
|
|
|
|
|
|
|
// SITE_HELPER_CLASS_HEADER
|
|
|
|
$this->fileContentStatic[$this->hhh . 'SITE_HELPER_CLASS_HEADER'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->setHelperClassHeader('site');
|
|
|
|
|
|
|
|
// HELPER_EXEL
|
|
|
|
$this->fileContentStatic[$this->hhh . 'HELPER_EXEL'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->setHelperExelMethods();
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// setup custom_admin_views and all needed stuff for the site
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($this->componentData->custom_admin_views)
|
|
|
|
&& ComponentbuilderHelper::checkArray(
|
|
|
|
$this->componentData->custom_admin_views
|
|
|
|
))
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
|
|
|
$this->target = 'custom_admin';
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->lang = 'admin';
|
2017-12-14 23:10:47 +00:00
|
|
|
// start dynamic build
|
|
|
|
foreach ($this->componentData->custom_admin_views as $view)
|
|
|
|
{
|
|
|
|
// for single views
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SView' . $this->hhh]
|
|
|
|
= $view['settings']->Code;
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'sview' . $this->hhh]
|
|
|
|
= $view['settings']->code;
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SVIEW' . $this->hhh]
|
|
|
|
= $view['settings']->CODE;
|
2017-12-14 23:10:47 +00:00
|
|
|
// for list views
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SViews' . $this->hhh]
|
|
|
|
= $view['settings']->Code;
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'sviews' . $this->hhh]
|
|
|
|
= $view['settings']->code;
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SVIEWS' . $this->hhh]
|
|
|
|
= $view['settings']->CODE;
|
2017-12-14 23:10:47 +00:00
|
|
|
// add to lang array
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->setLangContent(
|
|
|
|
$this->lang,
|
|
|
|
$this->langPrefix . '_' . $view['settings']->CODE,
|
|
|
|
$view['settings']->name
|
|
|
|
);
|
|
|
|
$this->setLangContent(
|
|
|
|
$this->lang,
|
|
|
|
$this->langPrefix . '_' . $view['settings']->CODE
|
|
|
|
. '_DESC', $view['settings']->description
|
|
|
|
);
|
2018-05-22 19:01:36 +00:00
|
|
|
// ICOMOON <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'ICOMOON' . $this->hhh]
|
|
|
|
= $view['icomoon'];
|
2017-12-14 23:10:47 +00:00
|
|
|
|
|
|
|
// set placeholders
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->placeholders[$this->hhh . 'SView' . $this->hhh]
|
|
|
|
= $view['settings']->Code;
|
|
|
|
$this->placeholders[$this->hhh . 'sview' . $this->hhh]
|
|
|
|
= $view['settings']->code;
|
|
|
|
$this->placeholders[$this->hhh . 'SVIEW' . $this->hhh]
|
|
|
|
= $view['settings']->CODE;
|
|
|
|
$this->placeholders[$this->bbb . 'SView' . $this->ddd]
|
|
|
|
= $view['settings']->Code;
|
|
|
|
$this->placeholders[$this->bbb . 'sview' . $this->ddd]
|
|
|
|
= $view['settings']->code;
|
|
|
|
$this->placeholders[$this->bbb . 'SVIEW' . $this->ddd]
|
|
|
|
= $view['settings']->CODE;
|
|
|
|
$this->placeholders[$this->hhh . 'SViews' . $this->hhh]
|
|
|
|
= $view['settings']->Code;
|
|
|
|
$this->placeholders[$this->hhh . 'sviews' . $this->hhh]
|
|
|
|
= $view['settings']->code;
|
|
|
|
$this->placeholders[$this->hhh . 'SVIEWS' . $this->hhh]
|
|
|
|
= $view['settings']->CODE;
|
|
|
|
$this->placeholders[$this->bbb . 'SViews' . $this->ddd]
|
|
|
|
= $view['settings']->Code;
|
|
|
|
$this->placeholders[$this->bbb . 'sviews' . $this->ddd]
|
|
|
|
= $view['settings']->code;
|
|
|
|
$this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd]
|
|
|
|
= $view['settings']->CODE;
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2019-06-22 10:43:26 +00:00
|
|
|
// Trigger Event: jcb_ce_onBeforeBuildCustomAdminViewContent
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onBeforeBuildCustomAdminViewContent',
|
|
|
|
array(&$this->componentContext, &$view,
|
|
|
|
&$view['settings']->code,
|
|
|
|
&$this->fileContentStatic,
|
|
|
|
&$this->fileContentDynamic[$view['settings']->code],
|
|
|
|
&$this->placeholders, &$this->hhh)
|
|
|
|
);
|
2019-06-22 10:43:26 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// set license per view if needed
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->setLockLicensePer(
|
|
|
|
$view['settings']->code, $this->target
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2020-04-23 21:15:07 +00:00
|
|
|
// check if this custom admin view is the default view
|
|
|
|
if ($this->dynamicDashboardType === 'custom_admin_views'
|
|
|
|
&& $this->dynamicDashboard === $view['settings']->code)
|
|
|
|
{
|
|
|
|
// HIDEMAINMENU <<<DYNAMIC>>>
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
2020-10-21 03:10:19 +00:00
|
|
|
. 'HIDEMAINMENU' . $this->hhh]
|
|
|
|
= '';
|
2020-04-23 21:15:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// HIDEMAINMENU <<<DYNAMIC>>>
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'HIDEMAINMENU' . $this->hhh]
|
|
|
|
= PHP_EOL . $this->_t(2) . '//' . $this->setLine(
|
|
|
|
__LINE__
|
|
|
|
) . " hide the main menu"
|
|
|
|
. PHP_EOL . $this->_t(2)
|
|
|
|
. "\$this->app->input->set('hidemainmenu', true);";
|
|
|
|
}
|
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
if ($view['settings']->main_get->gettype == 1)
|
|
|
|
{
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_BEFORE_GET_ITEM <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_BEFORE_GET_ITEM' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
|
|
|
$this->target . '_php_before_getitem',
|
|
|
|
$view['settings']->code, '', null, true
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_GET_ITEM <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_GET_ITEM' . $this->hhh]
|
|
|
|
= $this->setCustomViewGetItem(
|
|
|
|
$view['settings']->main_get,
|
|
|
|
$view['settings']->code, $this->_t(2)
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_AFTER_GET_ITEM <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_AFTER_GET_ITEM' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
|
|
|
$this->target . '_php_after_getitem',
|
|
|
|
$view['settings']->code, '', null, true
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
|
|
|
elseif ($view['settings']->main_get->gettype == 2)
|
|
|
|
{
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_GET_LIST_QUERY <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_GET_LIST_QUERY' . $this->hhh]
|
|
|
|
= $this->setCustomViewListQuery(
|
|
|
|
$view['settings']->main_get, $view['settings']->code
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_CUSTOM_BEFORE_LIST_QUERY' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
|
|
|
$this->target . '_php_getlistquery',
|
|
|
|
$view['settings']->code, PHP_EOL, null, true
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_BEFORE_GET_ITEMS <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_BEFORE_GET_ITEMS' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
|
|
|
$this->target . '_php_before_getitems',
|
|
|
|
$view['settings']->code, PHP_EOL, null, true
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_GET_ITEMS <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_GET_ITEMS' . $this->hhh]
|
|
|
|
= $this->setCustomViewGetItems(
|
|
|
|
$view['settings']->main_get, $view['settings']->code
|
|
|
|
);
|
2016-09-11 15:27:04 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_AFTER_GET_ITEMS <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_AFTER_GET_ITEMS' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
|
|
|
$this->target . '_php_after_getitems',
|
|
|
|
$view['settings']->code, PHP_EOL, null, true
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
2016-09-11 15:27:04 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_CUSTOM_METHODS <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_CUSTOM_METHODS' . $this->hhh]
|
|
|
|
= $this->setCustomViewCustomItemMethods(
|
|
|
|
$view['settings']->main_get, $view['settings']->code
|
|
|
|
);
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_CUSTOM_METHODS' . $this->hhh]
|
|
|
|
.= $this->setCustomViewCustomMethods(
|
|
|
|
$view, $view['settings']->code
|
|
|
|
);
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_DIPLAY_METHOD <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_DIPLAY_METHOD' . $this->hhh]
|
|
|
|
= $this->setCustomViewDisplayMethod($view);
|
2017-12-14 23:10:47 +00:00
|
|
|
// set document details
|
|
|
|
$this->setPrepareDocument($view);
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS' . $this->hhh]
|
|
|
|
= $this->setCustomViewExtraDisplayMethods($view);
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_CODE_BODY <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_CODE_BODY' . $this->hhh]
|
|
|
|
= $this->setCustomViewCodeBody($view);
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_BODY <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_BODY' . $this->hhh]
|
|
|
|
= $this->setCustomViewBody($view);
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT' . $this->hhh]
|
|
|
|
= $this->setCustomViewSubmitButtonScript($view);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2020-02-12 14:27:32 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// setup the templates
|
|
|
|
$this->setCustomViewTemplateBody($view);
|
2019-06-22 10:43:26 +00:00
|
|
|
|
2020-02-04 23:18:34 +00:00
|
|
|
// set the site form if needed
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_TOP_FORM' . $this->hhh]
|
|
|
|
= $this->setCustomViewForm(
|
|
|
|
$view['settings']->code,
|
|
|
|
$view['settings']->main_get->gettype, 1
|
|
|
|
);
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_BOTTOM_FORM' . $this->hhh]
|
|
|
|
= $this->setCustomViewForm(
|
|
|
|
$view['settings']->code,
|
|
|
|
$view['settings']->main_get->gettype, 2
|
|
|
|
);
|
2020-02-04 23:18:34 +00:00
|
|
|
|
2020-10-21 03:10:19 +00:00
|
|
|
// set headers based on the main get type
|
|
|
|
if ($view['settings']->main_get->gettype == 1)
|
|
|
|
{
|
2020-11-29 00:00:20 +00:00
|
|
|
// CUSTOM_ADMIN_VIEW_CONTROLLER_HEADER <<<DYNAMIC>>> add the header details for the controller
|
2020-10-26 20:30:51 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_VIEW_CONTROLLER_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
2020-11-17 04:06:34 +00:00
|
|
|
'custom.admin.view.controller',
|
|
|
|
$view['settings']->code
|
2020-10-26 20:30:51 +00:00
|
|
|
);
|
2020-10-21 03:10:19 +00:00
|
|
|
// CUSTOM_ADMIN_VIEW_MODEL_HEADER <<<DYNAMIC>>> add the header details for the model
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_VIEW_MODEL_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
|
|
|
'custom.admin.view.model', $view['settings']->code
|
|
|
|
);
|
2020-11-29 00:00:20 +00:00
|
|
|
// CUSTOM_ADMIN_VIEW_HEADER <<<DYNAMIC>>> add the header details for the view
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_VIEW_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
|
|
|
'custom.admin.view', $view['settings']->code
|
|
|
|
);
|
2020-10-21 03:10:19 +00:00
|
|
|
}
|
|
|
|
elseif ($view['settings']->main_get->gettype == 2)
|
|
|
|
{
|
2020-11-29 00:00:20 +00:00
|
|
|
// CUSTOM_ADMIN_VIEWS_CONTROLLER_HEADER <<<DYNAMIC>>> add the header details for the controller
|
2020-10-26 20:30:51 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_VIEWS_CONTROLLER_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
2020-11-17 04:06:34 +00:00
|
|
|
'custom.admin.views.controller',
|
|
|
|
$view['settings']->code
|
2020-10-26 20:30:51 +00:00
|
|
|
);
|
2020-10-21 03:10:19 +00:00
|
|
|
// CUSTOM_ADMIN_VIEWS_MODEL_HEADER <<<DYNAMIC>>> add the header details for the model
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_VIEWS_MODEL_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
|
|
|
'custom.admin.views.model', $view['settings']->code
|
|
|
|
);
|
2020-11-29 00:00:20 +00:00
|
|
|
// CUSTOM_ADMIN_VIEWS_HEADER <<<DYNAMIC>>> add the header details for the view
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'CUSTOM_ADMIN_VIEWS_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
|
|
|
'custom.admin.views', $view['settings']->code
|
|
|
|
);
|
2020-10-21 03:10:19 +00:00
|
|
|
}
|
|
|
|
|
2019-06-22 10:43:26 +00:00
|
|
|
// Trigger Event: jcb_ce_onAfterBuildCustomAdminViewContent
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onAfterBuildCustomAdminViewContent',
|
|
|
|
array(&$this->componentContext, &$view,
|
|
|
|
&$view['settings']->code,
|
|
|
|
&$this->fileContentStatic,
|
|
|
|
&$this->fileContentDynamic[$view['settings']->code],
|
|
|
|
&$this->placeholders, &$this->hhh)
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
2016-09-11 15:27:04 +00:00
|
|
|
|
2017-12-14 23:10:47 +00:00
|
|
|
// setup the layouts
|
|
|
|
$this->setCustomViewLayouts();
|
|
|
|
}
|
2016-09-11 15:27:04 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// VIEWARRAY
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'VIEWARRAY' . $this->hhh]
|
|
|
|
= PHP_EOL . implode("," . PHP_EOL, $viewarray);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CUSTOM_ADMIN_EDIT_VIEW_ARRAY
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'SITE_EDIT_VIEW_ARRAY'
|
|
|
|
. $this->hhh]
|
|
|
|
= PHP_EOL . implode("," . PHP_EOL, $site_edit_view_array);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// MAINMENUS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'MAINMENUS' . $this->hhh]
|
|
|
|
= $this->setMainMenus();
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// SUBMENU
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'SUBMENU' . $this->hhh]
|
|
|
|
= $this->setSubMenus();
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// GET_CRYPT_KEY
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'GET_CRYPT_KEY' . $this->hhh]
|
|
|
|
= $this->setGetCryptKey();
|
2017-12-14 23:10:47 +00:00
|
|
|
|
|
|
|
// set the license locker
|
|
|
|
$this->setLockLicense();
|
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CONTRIBUTORS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'CONTRIBUTORS' . $this->hhh]
|
|
|
|
= $this->theContributors;
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// INSTALL
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'INSTALL' . $this->hhh]
|
|
|
|
= $this->setInstall();
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// UNINSTALL
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'UNINSTALL' . $this->hhh]
|
|
|
|
= $this->setUninstall();
|
2016-09-11 15:27:04 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// UPDATE_VERSION_MYSQL
|
2017-06-16 12:38:06 +00:00
|
|
|
$this->setVersionController();
|
2018-03-18 04:52:07 +00:00
|
|
|
|
2018-03-09 03:26:44 +00:00
|
|
|
// only set these if default dashboard it used
|
|
|
|
if (!ComponentbuilderHelper::checkString($this->dynamicDashboard))
|
|
|
|
{
|
2018-05-22 19:01:36 +00:00
|
|
|
// DASHBOARDVIEW
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'DASHBOARDVIEW'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->componentCodeName;
|
2018-03-18 04:52:07 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// DASHBOARDICONS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$this->componentCodeName][$this->hhh
|
|
|
|
. 'DASHBOARDICONS' . $this->hhh]
|
|
|
|
= $this->setDashboardIcons();
|
2016-09-11 15:27:04 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// DASHBOARDICONACCESS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$this->componentCodeName][$this->hhh
|
|
|
|
. 'DASHBOARDICONACCESS' . $this->hhh]
|
|
|
|
= $this->setDashboardIconAccess();
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// DASH_MODEL_METHODS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$this->componentCodeName][$this->hhh
|
|
|
|
. 'DASH_MODEL_METHODS' . $this->hhh]
|
|
|
|
= $this->setDashboardModelMethods();
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// DASH_GET_CUSTOM_DATA
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$this->componentCodeName][$this->hhh
|
|
|
|
. 'DASH_GET_CUSTOM_DATA' . $this->hhh]
|
|
|
|
= $this->setDashboardGetCustomData();
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// DASH_DISPLAY_DATA
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$this->componentCodeName][$this->hhh
|
|
|
|
. 'DASH_DISPLAY_DATA' . $this->hhh]
|
|
|
|
= $this->setDashboardDisplayData();
|
2018-03-09 03:26:44 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-05-22 19:01:36 +00:00
|
|
|
// DASHBOARDVIEW
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'DASHBOARDVIEW'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->dynamicDashboard;
|
2018-03-09 03:26:44 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
|
|
|
|
// add import
|
|
|
|
if (isset($this->addEximport) && $this->addEximport)
|
|
|
|
{
|
|
|
|
// setup import files
|
|
|
|
$target = array('admin' => 'import');
|
|
|
|
$this->buildDynamique($target, 'import');
|
2020-04-19 00:48:23 +00:00
|
|
|
// IMPORT_EXT_METHOD <<<DYNAMIC>>>
|
|
|
|
$this->fileContentDynamic['import'][$this->hhh
|
|
|
|
. 'IMPORT_EXT_METHOD' . $this->hhh]
|
|
|
|
= PHP_EOL . PHP_EOL . $this->setPlaceholders(
|
2020-04-23 21:15:07 +00:00
|
|
|
ComponentbuilderHelper::getDynamicScripts('ext'),
|
|
|
|
$this->placeholders
|
2020-04-19 00:48:23 +00:00
|
|
|
);
|
|
|
|
// IMPORT_SETDATA_METHOD <<<DYNAMIC>>>
|
|
|
|
$this->fileContentDynamic['import'][$this->hhh
|
|
|
|
. 'IMPORT_SETDATA_METHOD' . $this->hhh]
|
|
|
|
= PHP_EOL . PHP_EOL . $this->setPlaceholders(
|
2020-04-23 21:15:07 +00:00
|
|
|
ComponentbuilderHelper::getDynamicScripts('setdata'),
|
|
|
|
$this->placeholders
|
2020-04-19 00:48:23 +00:00
|
|
|
);
|
|
|
|
// IMPORT_SAVE_METHOD <<<DYNAMIC>>>
|
|
|
|
$this->fileContentDynamic['import'][$this->hhh
|
|
|
|
. 'IMPORT_SAVE_METHOD' . $this->hhh]
|
|
|
|
= PHP_EOL . PHP_EOL . $this->setPlaceholders(
|
2020-04-23 21:15:07 +00:00
|
|
|
ComponentbuilderHelper::getDynamicScripts('save'),
|
|
|
|
$this->placeholders
|
2020-04-19 00:48:23 +00:00
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ensure that the ajax model and controller is set if needed
|
|
|
|
if (isset($this->addAjax) && $this->addAjax)
|
|
|
|
{
|
|
|
|
// setup Ajax files
|
|
|
|
$target = array('admin' => 'ajax');
|
|
|
|
$this->buildDynamique($target, 'ajax');
|
|
|
|
// set the controller
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic['ajax'][$this->hhh
|
|
|
|
. 'REGISTER_AJAX_TASK' . $this->hhh]
|
|
|
|
= $this->setRegisterAjaxTask('admin');
|
|
|
|
$this->fileContentDynamic['ajax'][$this->hhh
|
|
|
|
. 'AJAX_INPUT_RETURN' . $this->hhh]
|
|
|
|
= $this->setAjaxInputReturn('admin');
|
2017-12-14 23:10:47 +00:00
|
|
|
// set the module
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic['ajax'][$this->hhh
|
|
|
|
. 'AJAX_MODEL_METHODS' . $this->hhh]
|
|
|
|
= $this->setAjaxModelMethods('admin');
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ensure that the site ajax model and controller is set if needed
|
|
|
|
if (isset($this->addSiteAjax) && $this->addSiteAjax)
|
|
|
|
{
|
|
|
|
// setup Ajax files
|
|
|
|
$target = array('site' => 'ajax');
|
|
|
|
$this->buildDynamique($target, 'ajax');
|
|
|
|
// set the controller
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic['ajax'][$this->hhh
|
|
|
|
. 'REGISTER_SITE_AJAX_TASK' . $this->hhh]
|
|
|
|
= $this->setRegisterAjaxTask('site');
|
|
|
|
$this->fileContentDynamic['ajax'][$this->hhh
|
|
|
|
. 'AJAX_SITE_INPUT_RETURN' . $this->hhh]
|
|
|
|
= $this->setAjaxInputReturn('site');
|
2017-12-14 23:10:47 +00:00
|
|
|
// set the module
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic['ajax'][$this->hhh
|
|
|
|
. 'AJAX_SITE_MODEL_METHODS' . $this->hhh]
|
|
|
|
= $this->setAjaxModelMethods('site');
|
2017-12-14 23:10:47 +00:00
|
|
|
}
|
2018-05-11 04:08:14 +00:00
|
|
|
|
2018-03-27 09:57:16 +00:00
|
|
|
// build the validation rules
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($this->validationRules)
|
|
|
|
&& ComponentbuilderHelper::checkArray($this->validationRules))
|
2018-03-27 09:57:16 +00:00
|
|
|
{
|
|
|
|
foreach ($this->validationRules as $rule => $_php)
|
|
|
|
{
|
|
|
|
// setup rule file
|
|
|
|
$target = array('admin' => 'a_rule_zi');
|
|
|
|
$this->buildDynamique($target, 'rule', $rule);
|
|
|
|
// set the JFormRule Name
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic['a_rule_zi_' . $rule][$this->hhh
|
|
|
|
. 'Name' . $this->hhh]
|
|
|
|
= ucfirst($rule);
|
2018-03-27 09:57:16 +00:00
|
|
|
// set the JFormRule PHP
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic['a_rule_zi_' . $rule][$this->hhh
|
|
|
|
. 'VALIDATION_RULE_METHODS' . $this->hhh]
|
|
|
|
= PHP_EOL . $_php;
|
2018-03-27 09:57:16 +00:00
|
|
|
}
|
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
|
|
|
|
// run the second run if needed
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($this->secondRunAdmin)
|
|
|
|
&& ComponentbuilderHelper::checkArray($this->secondRunAdmin))
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
|
|
|
// start dynamic build
|
|
|
|
foreach ($this->secondRunAdmin as $function => $arrays)
|
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
if (ComponentbuilderHelper::checkArray($arrays)
|
|
|
|
&& ComponentbuilderHelper::checkString($function))
|
2017-12-14 23:10:47 +00:00
|
|
|
{
|
|
|
|
foreach ($arrays as $array)
|
|
|
|
{
|
|
|
|
$this->{$function}($array);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CONFIG_FIELDSETS
|
2020-03-28 13:34:14 +00:00
|
|
|
$keepLang = $this->lang;
|
2017-12-14 23:10:47 +00:00
|
|
|
$this->lang = 'admin';
|
|
|
|
// run field sets for second time
|
|
|
|
$this->setConfigFieldsets(2);
|
|
|
|
$this->lang = $keepLang;
|
|
|
|
|
2016-02-26 00:20:09 +00:00
|
|
|
// setup front-views and all needed stuff for the site
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($this->componentData->site_views)
|
|
|
|
&& ComponentbuilderHelper::checkArray(
|
|
|
|
$this->componentData->site_views
|
|
|
|
))
|
2016-02-26 00:20:09 +00:00
|
|
|
{
|
|
|
|
$this->target = 'site';
|
|
|
|
// start dynamic build
|
|
|
|
foreach ($this->componentData->site_views as $view)
|
|
|
|
{
|
|
|
|
// for list views
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SViews' . $this->hhh]
|
|
|
|
= $view['settings']->Code;
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'sviews' . $this->hhh]
|
|
|
|
= $view['settings']->code;
|
2016-02-26 00:20:09 +00:00
|
|
|
// for single views
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SView' . $this->hhh]
|
|
|
|
= $view['settings']->Code;
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'sview' . $this->hhh]
|
|
|
|
= $view['settings']->code;
|
2016-02-26 00:20:09 +00:00
|
|
|
|
|
|
|
// set placeholder
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->placeholders[$this->hhh . 'SView' . $this->hhh]
|
|
|
|
= $view['settings']->Code;
|
|
|
|
$this->placeholders[$this->hhh . 'sview' . $this->hhh]
|
|
|
|
= $view['settings']->code;
|
|
|
|
$this->placeholders[$this->hhh . 'SVIEW' . $this->hhh]
|
|
|
|
= $view['settings']->CODE;
|
|
|
|
$this->placeholders[$this->bbb . 'SView' . $this->ddd]
|
|
|
|
= $view['settings']->Code;
|
|
|
|
$this->placeholders[$this->bbb . 'sview' . $this->ddd]
|
|
|
|
= $view['settings']->code;
|
|
|
|
$this->placeholders[$this->bbb . 'SVIEW' . $this->ddd]
|
|
|
|
= $view['settings']->CODE;
|
|
|
|
$this->placeholders[$this->hhh . 'SViews' . $this->hhh]
|
|
|
|
= $view['settings']->Code;
|
|
|
|
$this->placeholders[$this->hhh . 'sviews' . $this->hhh]
|
|
|
|
= $view['settings']->code;
|
|
|
|
$this->placeholders[$this->hhh . 'SVIEWS' . $this->hhh]
|
|
|
|
= $view['settings']->CODE;
|
|
|
|
$this->placeholders[$this->bbb . 'SViews' . $this->ddd]
|
|
|
|
= $view['settings']->Code;
|
|
|
|
$this->placeholders[$this->bbb . 'sviews' . $this->ddd]
|
|
|
|
= $view['settings']->code;
|
|
|
|
$this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd]
|
|
|
|
= $view['settings']->CODE;
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2019-06-22 10:43:26 +00:00
|
|
|
// Trigger Event: jcb_ce_onBeforeBuildSiteViewContent
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onBeforeBuildSiteViewContent',
|
|
|
|
array(&$this->componentContext, &$view,
|
|
|
|
&$view['settings']->code,
|
|
|
|
&$this->fileContentStatic,
|
|
|
|
&$this->fileContentDynamic[$view['settings']->code],
|
|
|
|
&$this->placeholders, &$this->hhh)
|
|
|
|
);
|
2019-06-22 10:43:26 +00:00
|
|
|
|
2016-02-26 00:20:09 +00:00
|
|
|
// set license per view if needed
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->setLockLicensePer(
|
|
|
|
$view['settings']->code, $this->target
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2016-02-26 00:20:09 +00:00
|
|
|
// set the site default view
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($view['default_view'])
|
|
|
|
&& $view['default_view'] == 1)
|
2016-02-26 00:20:09 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'SITE_DEFAULT_VIEW' . $this->hhh]
|
|
|
|
= $view['settings']->code;
|
2016-02-26 00:20:09 +00:00
|
|
|
}
|
|
|
|
// add site menu
|
2017-10-30 18:50:56 +00:00
|
|
|
if (isset($view['menu']) && $view['menu'] == 1)
|
2016-02-26 00:20:09 +00:00
|
|
|
{
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_MENU_XML <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_MENU_XML' . $this->hhh]
|
|
|
|
= $this->setCustomViewMenu($view);
|
2016-02-26 00:20:09 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2016-02-26 00:20:09 +00:00
|
|
|
// insure the needed route helper is loaded
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTEHELPER'
|
|
|
|
. $this->hhh]
|
|
|
|
.= $this->setRouterHelp(
|
|
|
|
$view['settings']->code, $view['settings']->code, true
|
|
|
|
);
|
2020-11-17 04:06:34 +00:00
|
|
|
// build route details
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTER_PARSE_SWITCH'
|
|
|
|
. $this->hhh]
|
|
|
|
.= $this->routerParseSwitch(
|
|
|
|
$view['settings']->code, $view
|
|
|
|
);
|
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
|
|
|
|
. $this->hhh]
|
|
|
|
.= $this->routerBuildViews($view['settings']->code);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2016-02-26 00:20:09 +00:00
|
|
|
if ($view['settings']->main_get->gettype == 1)
|
|
|
|
{
|
2018-05-22 19:01:36 +00:00
|
|
|
// set user permission access check USER_PERMISSION_CHECK_ACCESS <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'USER_PERMISSION_CHECK_ACCESS' . $this->hhh]
|
|
|
|
= $this->setUserPermissionCheckAccess($view, 1);
|
2018-04-18 19:11:14 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_BEFORE_GET_ITEM <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_BEFORE_GET_ITEM' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
|
|
|
$this->target . '_php_before_getitem',
|
|
|
|
$view['settings']->code, '', null, true
|
|
|
|
);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_GET_ITEM <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_GET_ITEM' . $this->hhh]
|
|
|
|
= $this->setCustomViewGetItem(
|
|
|
|
$view['settings']->main_get,
|
|
|
|
$view['settings']->code, $this->_t(2)
|
|
|
|
);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_AFTER_GET_ITEM <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_AFTER_GET_ITEM' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
|
|
|
$this->target . '_php_after_getitem',
|
|
|
|
$view['settings']->code, '', null, true
|
|
|
|
);
|
2016-02-26 00:20:09 +00:00
|
|
|
}
|
|
|
|
elseif ($view['settings']->main_get->gettype == 2)
|
2016-12-30 10:47:19 +00:00
|
|
|
{
|
2018-05-22 19:01:36 +00:00
|
|
|
// set user permission access check USER_PERMISSION_CHECK_ACCESS <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'USER_PERMISSION_CHECK_ACCESS' . $this->hhh]
|
|
|
|
= $this->setUserPermissionCheckAccess($view, 2);
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_GET_LIST_QUERY <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_GET_LIST_QUERY' . $this->hhh]
|
|
|
|
= $this->setCustomViewListQuery(
|
|
|
|
$view['settings']->main_get, $view['settings']->code
|
|
|
|
);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_BEFORE_GET_ITEMS <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_BEFORE_GET_ITEMS' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
|
|
|
$this->target . '_php_before_getitems',
|
|
|
|
$view['settings']->code, PHP_EOL, null, true
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_GET_ITEMS <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_GET_ITEMS' . $this->hhh]
|
|
|
|
= $this->setCustomViewGetItems(
|
|
|
|
$view['settings']->main_get, $view['settings']->code
|
|
|
|
);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_AFTER_GET_ITEMS <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_AFTER_GET_ITEMS' . $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
|
|
|
$this->target . '_php_after_getitems',
|
|
|
|
$view['settings']->code, PHP_EOL, null, true
|
|
|
|
);
|
2016-02-26 00:20:09 +00:00
|
|
|
}
|
|
|
|
// add to lang array
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->setLangContent(
|
|
|
|
'site',
|
|
|
|
$this->langPrefix . '_' . $view['settings']->CODE,
|
|
|
|
$view['settings']->name
|
|
|
|
);
|
|
|
|
$this->setLangContent(
|
|
|
|
'site',
|
|
|
|
$this->langPrefix . '_' . $view['settings']->CODE
|
|
|
|
. '_DESC', $view['settings']->description
|
|
|
|
);
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_CUSTOM_METHODS <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_CUSTOM_METHODS' . $this->hhh]
|
|
|
|
= $this->setCustomViewCustomItemMethods(
|
|
|
|
$view['settings']->main_get, $view['settings']->code
|
|
|
|
);
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_CUSTOM_METHODS' . $this->hhh]
|
|
|
|
.= $this->setCustomViewCustomMethods(
|
|
|
|
$view, $view['settings']->code
|
|
|
|
);
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_DIPLAY_METHOD <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_DIPLAY_METHOD' . $this->hhh]
|
|
|
|
= $this->setCustomViewDisplayMethod($view);
|
2016-02-26 00:20:09 +00:00
|
|
|
// set document details
|
|
|
|
$this->setPrepareDocument($view);
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_EXTRA_DIPLAY_METHODS <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_EXTRA_DIPLAY_METHODS' . $this->hhh]
|
|
|
|
= $this->setCustomViewExtraDisplayMethods($view);
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_CODE_BODY <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_CODE_BODY' . $this->hhh]
|
|
|
|
= $this->setCustomViewCodeBody($view);
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_BODY <<<DYNAMIC>>>
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_BODY' . $this->hhh]
|
|
|
|
= $this->setCustomViewBody($view);
|
2016-02-26 00:20:09 +00:00
|
|
|
|
|
|
|
// setup the templates
|
|
|
|
$this->setCustomViewTemplateBody($view);
|
2020-03-28 13:34:14 +00:00
|
|
|
|
2018-09-11 20:08:58 +00:00
|
|
|
// set the site form if needed
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_TOP_FORM' . $this->hhh]
|
|
|
|
= $this->setCustomViewForm(
|
|
|
|
$view['settings']->code,
|
|
|
|
$view['settings']->main_get->gettype, 1
|
|
|
|
);
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_BOTTOM_FORM' . $this->hhh]
|
|
|
|
= $this->setCustomViewForm(
|
|
|
|
$view['settings']->code,
|
|
|
|
$view['settings']->main_get->gettype, 2
|
|
|
|
);
|
2019-06-22 10:43:26 +00:00
|
|
|
|
2020-10-21 03:10:19 +00:00
|
|
|
// set headers based on the main get type
|
|
|
|
if ($view['settings']->main_get->gettype == 1)
|
|
|
|
{
|
2020-10-26 20:30:51 +00:00
|
|
|
// insure the controller headers are added
|
|
|
|
if (ComponentbuilderHelper::checkString(
|
|
|
|
$view['settings']->php_controller
|
|
|
|
)
|
|
|
|
&& $view['settings']->php_controller != '//')
|
|
|
|
{
|
|
|
|
// SITE_VIEW_CONTROLLER_HEADER <<<DYNAMIC>>> add the header details for the model
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_VIEW_CONTROLLER_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
|
|
|
'site.view.controller', $view['settings']->code
|
|
|
|
);
|
|
|
|
}
|
2020-10-21 03:10:19 +00:00
|
|
|
// SITE_VIEW_MODEL_HEADER <<<DYNAMIC>>> add the header details for the model
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_VIEW_MODEL_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
|
|
|
'site.view.model', $view['settings']->code
|
|
|
|
);
|
2020-11-29 00:00:20 +00:00
|
|
|
// SITE_VIEW_HEADER <<<DYNAMIC>>> add the header details for the view
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_VIEW_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
|
|
|
'site.view', $view['settings']->code
|
|
|
|
);
|
2020-10-21 03:10:19 +00:00
|
|
|
}
|
|
|
|
elseif ($view['settings']->main_get->gettype == 2)
|
|
|
|
{
|
2020-10-26 20:30:51 +00:00
|
|
|
// insure the controller headers are added
|
|
|
|
if (ComponentbuilderHelper::checkString(
|
|
|
|
$view['settings']->php_controller
|
|
|
|
)
|
|
|
|
&& $view['settings']->php_controller != '//')
|
|
|
|
{
|
|
|
|
// SITE_VIEW_CONTROLLER_HEADER <<<DYNAMIC>>> add the header details for the model
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_VIEW_CONTROLLER_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
|
|
|
'site.views.controller', $view['settings']->code
|
|
|
|
);
|
|
|
|
}
|
2020-10-21 03:10:19 +00:00
|
|
|
// SITE_VIEWS_MODEL_HEADER <<<DYNAMIC>>> add the header details for the model
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_VIEWS_MODEL_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
|
|
|
'site.views.model', $view['settings']->code
|
|
|
|
);
|
2020-11-29 00:00:20 +00:00
|
|
|
// SITE_VIEWS_HEADER <<<DYNAMIC>>> add the header details for the view
|
|
|
|
$this->fileContentDynamic[$view['settings']->code][$this->hhh
|
|
|
|
. 'SITE_VIEWS_HEADER' . $this->hhh]
|
|
|
|
= $this->setClassHeaders(
|
|
|
|
'site.views', $view['settings']->code
|
|
|
|
);
|
2020-10-21 03:10:19 +00:00
|
|
|
}
|
|
|
|
|
2019-06-22 10:43:26 +00:00
|
|
|
// Trigger Event: jcb_ce_onAfterBuildSiteViewContent
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onAfterBuildSiteViewContent',
|
|
|
|
array(&$this->componentContext, &$view,
|
|
|
|
&$view['settings']->code,
|
|
|
|
&$this->fileContentStatic,
|
|
|
|
&$this->fileContentDynamic[$view['settings']->code],
|
|
|
|
&$this->placeholders, &$this->hhh)
|
|
|
|
);
|
2016-02-26 00:20:09 +00:00
|
|
|
}
|
2020-06-25 19:22:30 +00:00
|
|
|
|
2018-08-07 12:25:26 +00:00
|
|
|
// setup the layouts
|
|
|
|
$this->setCustomViewLayouts();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// clear all site folder since none is needed
|
|
|
|
$this->removeSiteFolder = true;
|
|
|
|
}
|
|
|
|
// load the site statics
|
|
|
|
if (!$this->removeSiteFolder || !$this->removeSiteEditFolder)
|
|
|
|
{
|
|
|
|
$this->target = 'site';
|
2017-08-20 17:52:35 +00:00
|
|
|
// if no default site view was set, the redirect to root
|
2020-03-28 13:34:14 +00:00
|
|
|
if (!isset(
|
|
|
|
$this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW'
|
|
|
|
. $this->hhh]
|
|
|
|
))
|
2017-08-20 17:52:35 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'SITE_DEFAULT_VIEW'
|
|
|
|
. $this->hhh]
|
|
|
|
= '';
|
2017-08-20 17:52:35 +00:00
|
|
|
}
|
2016-02-26 00:20:09 +00:00
|
|
|
// set site custom script to helper class
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_CUSTOM_HELPER_SCRIPT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'SITE_CUSTOM_HELPER_SCRIPT' . $this->hhh]
|
|
|
|
= $this->setPlaceholders(
|
|
|
|
$this->customScriptBuilder['component_php_helper_site'],
|
|
|
|
$this->placeholders
|
|
|
|
);
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_GLOBAL_EVENT_HELPER
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT_HELPER'
|
|
|
|
. $this->hhh]
|
|
|
|
= '';
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_GLOBAL_EVENT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT'
|
|
|
|
. $this->hhh]
|
|
|
|
= '';
|
2016-02-26 00:20:09 +00:00
|
|
|
// now load the data for the global event if needed
|
|
|
|
if ($this->componentData->add_site_event == 1)
|
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT'
|
|
|
|
. $this->hhh]
|
|
|
|
= PHP_EOL . PHP_EOL . '// Triger the Global Site Event';
|
|
|
|
$this->fileContentStatic[$this->hhh . 'SITE_GLOBAL_EVENT'
|
|
|
|
. $this->hhh]
|
|
|
|
.= PHP_EOL . $this->fileContentStatic[$this->hhh
|
|
|
|
. 'Component' . $this->hhh]
|
|
|
|
. 'Helper::globalEvent($document);';
|
2018-05-22 19:01:36 +00:00
|
|
|
// SITE_GLOBAL_EVENT_HELPER
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
= PHP_EOL . PHP_EOL . $this->_t(1) . '/**';
|
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
.= PHP_EOL . $this->_t(1)
|
|
|
|
. '* The Global Site Event Method.';
|
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
.= PHP_EOL . $this->_t(1) . '**/';
|
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
.= PHP_EOL . $this->_t(1)
|
|
|
|
. 'public static function globalEvent($document)';
|
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
.= PHP_EOL . $this->_t(1) . '{';
|
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
.= PHP_EOL . $this->setPlaceholders(
|
|
|
|
$this->customScriptBuilder['component_php_site_event'],
|
|
|
|
$this->placeholders
|
|
|
|
);
|
|
|
|
$this->fileContentStatic[$this->hhh
|
|
|
|
. 'SITE_GLOBAL_EVENT_HELPER' . $this->hhh]
|
|
|
|
.= PHP_EOL . $this->_t(1) . '}';
|
2016-02-26 00:20:09 +00:00
|
|
|
}
|
2017-01-20 00:16:50 +00:00
|
|
|
}
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// PREINSTALLSCRIPT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'PREINSTALLSCRIPT'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
|
|
|
'php_preflight', 'install', PHP_EOL, null, true
|
|
|
|
);
|
2016-10-23 22:48:26 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// PREUPDATESCRIPT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'PREUPDATESCRIPT'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->getCustomScriptBuilder(
|
|
|
|
'php_preflight', 'update', PHP_EOL, null, true
|
|
|
|
);
|
2016-10-23 22:48:26 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// POSTINSTALLSCRIPT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'POSTINSTALLSCRIPT'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->setPostInstallScript();
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// POSTUPDATESCRIPT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'POSTUPDATESCRIPT'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->setPostUpdateScript();
|
2016-02-26 00:20:09 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// UNINSTALLSCRIPT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'UNINSTALLSCRIPT'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->setUninstallScript();
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// MOVEFOLDERSSCRIPT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'MOVEFOLDERSSCRIPT'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->setMoveFolderScript();
|
2018-02-28 02:27:03 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// MOVEFOLDERSMETHOD
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'MOVEFOLDERSMETHOD'
|
|
|
|
. $this->hhh]
|
|
|
|
= $this->setMoveFolderMethod();
|
2018-02-28 02:27:03 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// HELPER_UIKIT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'HELPER_UIKIT' . $this->hhh]
|
|
|
|
= $this->setUikitHelperMethods();
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// CONFIG_FIELDSETS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'CONFIG_FIELDSETS'
|
|
|
|
. $this->hhh]
|
|
|
|
= implode(PHP_EOL, $this->configFieldSets);
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2016-02-26 00:20:09 +00:00
|
|
|
// check if this has been set
|
2020-03-28 13:34:14 +00:00
|
|
|
if (!isset(
|
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
|
|
|
|
. $this->hhh]
|
|
|
|
)
|
|
|
|
|| !ComponentbuilderHelper::checkString(
|
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
|
|
|
|
. $this->hhh]
|
|
|
|
))
|
2016-02-26 00:20:09 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
|
|
|
|
. $this->hhh]
|
|
|
|
= 0;
|
2016-02-26 00:20:09 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'ROUTER_BUILD_VIEWS'
|
|
|
|
. $this->hhh]
|
|
|
|
= '(' . $this->fileContentStatic[$this->hhh
|
|
|
|
. 'ROUTER_BUILD_VIEWS' . $this->hhh] . ')';
|
2016-02-26 00:20:09 +00:00
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// README
|
2016-02-26 00:20:09 +00:00
|
|
|
if ($this->componentData->addreadme)
|
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentStatic[$this->hhh . 'README' . $this->hhh]
|
|
|
|
= $this->componentData->readme;
|
2016-02-26 00:20:09 +00:00
|
|
|
}
|
2019-06-22 10:43:26 +00:00
|
|
|
|
2019-12-06 05:31:32 +00:00
|
|
|
// tweak system to set stuff to the module domain
|
2020-03-28 13:34:14 +00:00
|
|
|
$_backup_target = $this->target;
|
|
|
|
$_backup_lang = $this->lang;
|
2019-12-06 05:31:32 +00:00
|
|
|
$_backup_langPrefix = $this->langPrefix;
|
|
|
|
// infuse module data if set
|
|
|
|
if (ComponentbuilderHelper::checkArray($this->joomlaModules))
|
|
|
|
{
|
|
|
|
foreach ($this->joomlaModules as $module)
|
|
|
|
{
|
|
|
|
if (ComponentbuilderHelper::checkObject($module))
|
|
|
|
{
|
2020-04-03 18:45:48 +00:00
|
|
|
// Trigger Event: jcb_ce_onBeforeInfuseModuleData
|
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onBeforeInfuseModuleData',
|
2020-07-13 02:52:06 +00:00
|
|
|
array(&$this->componentContext, &$module, &$this)
|
2020-04-03 18:45:48 +00:00
|
|
|
);
|
2019-12-06 05:31:32 +00:00
|
|
|
$this->target = $module->key;
|
|
|
|
$this->lang = $module->key;
|
|
|
|
$this->langPrefix = $module->lang_prefix;
|
|
|
|
// MODCODE
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$module->key][$this->hhh
|
|
|
|
. 'MODCODE' . $this->hhh]
|
|
|
|
= $this->getModCode($module);
|
2019-12-06 05:31:32 +00:00
|
|
|
// DYNAMICGET
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$module->key][$this->hhh
|
|
|
|
. 'DYNAMICGETS' . $this->hhh]
|
|
|
|
= $this->setCustomViewCustomMethods(
|
|
|
|
$module, $module->key
|
|
|
|
);
|
2019-12-06 05:31:32 +00:00
|
|
|
// HELPERCODE
|
|
|
|
if ($module->add_class_helper >= 1)
|
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$module->key][$this->hhh
|
|
|
|
. 'HELPERCODE' . $this->hhh]
|
|
|
|
= $this->getModHelperCode($module);
|
2019-12-06 05:31:32 +00:00
|
|
|
}
|
|
|
|
// MODDEFAULT
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$module->key][$this->hhh
|
|
|
|
. 'MODDEFAULT' . $this->hhh]
|
2020-11-06 05:06:38 +00:00
|
|
|
= $this->getModDefault($module, $module->key);
|
2019-12-06 05:31:32 +00:00
|
|
|
// only add install script if needed
|
|
|
|
if ($module->add_install_script)
|
|
|
|
{
|
|
|
|
// INSTALLCLASS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$module->key][$this->hhh
|
|
|
|
. 'INSTALLCLASS' . $this->hhh]
|
|
|
|
= $this->getExtensionInstallClass($module);
|
2019-12-06 05:31:32 +00:00
|
|
|
}
|
|
|
|
// FIELDSET
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($module->form_files)
|
|
|
|
&& ComponentbuilderHelper::checkArray(
|
|
|
|
$module->form_files
|
|
|
|
))
|
2019-12-06 05:31:32 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
foreach ($module->form_files as $file => $files)
|
2019-12-06 05:31:32 +00:00
|
|
|
{
|
|
|
|
foreach ($files as $field_name => $fieldsets)
|
|
|
|
{
|
|
|
|
foreach ($fieldsets as $fieldset => $fields)
|
|
|
|
{
|
|
|
|
// FIELDSET_ . $file.$field_name.$fieldset
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$module->key][$this->hhh
|
|
|
|
. 'FIELDSET_' . $file . $field_name
|
|
|
|
. $fieldset . $this->hhh]
|
|
|
|
= $this->getExtensionFieldsetXML(
|
|
|
|
$module, $fields
|
|
|
|
);
|
2019-12-06 05:31:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// MAINXML
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$module->key][$this->hhh
|
|
|
|
. 'MAINXML' . $this->hhh]
|
|
|
|
= $this->getModuleMainXML($module);
|
2020-04-03 18:45:48 +00:00
|
|
|
// Trigger Event: jcb_ce_onAfterInfuseModuleData
|
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onAfterInfuseModuleData',
|
2020-07-13 02:52:06 +00:00
|
|
|
array(&$this->componentContext, &$module, &$this)
|
2020-04-03 18:45:48 +00:00
|
|
|
);
|
2019-12-06 05:31:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// infuse plugin data if set
|
2019-08-22 01:54:47 +00:00
|
|
|
if (ComponentbuilderHelper::checkArray($this->joomlaPlugins))
|
2019-08-04 22:38:53 +00:00
|
|
|
{
|
2019-08-22 01:54:47 +00:00
|
|
|
foreach ($this->joomlaPlugins as $plugin)
|
2019-08-04 22:38:53 +00:00
|
|
|
{
|
|
|
|
if (ComponentbuilderHelper::checkObject($plugin))
|
|
|
|
{
|
2020-04-03 18:45:48 +00:00
|
|
|
// Trigger Event: jcb_ce_onBeforeInfusePluginData
|
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onBeforeInfusePluginData',
|
2020-07-13 02:52:06 +00:00
|
|
|
array(&$this->componentContext, &$plugin, &$this)
|
2020-04-03 18:45:48 +00:00
|
|
|
);
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->target = $plugin->key;
|
|
|
|
$this->lang = $plugin->key;
|
2019-08-22 01:54:47 +00:00
|
|
|
$this->langPrefix = $plugin->lang_prefix;
|
2019-08-04 22:38:53 +00:00
|
|
|
// MAINCLASS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$plugin->key][$this->hhh
|
|
|
|
. 'MAINCLASS' . $this->hhh]
|
|
|
|
= $this->getPluginMainClass($plugin);
|
2019-08-04 22:38:53 +00:00
|
|
|
// only add install script if needed
|
|
|
|
if ($plugin->add_install_script)
|
|
|
|
{
|
|
|
|
// INSTALLCLASS
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$plugin->key][$this->hhh
|
|
|
|
. 'INSTALLCLASS' . $this->hhh]
|
|
|
|
= $this->getExtensionInstallClass($plugin);
|
2019-08-04 22:38:53 +00:00
|
|
|
}
|
2019-08-22 01:54:47 +00:00
|
|
|
// FIELDSET
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($plugin->form_files)
|
|
|
|
&& ComponentbuilderHelper::checkArray(
|
|
|
|
$plugin->form_files
|
|
|
|
))
|
2019-08-22 01:54:47 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
foreach ($plugin->form_files as $file => $files)
|
2019-08-22 01:54:47 +00:00
|
|
|
{
|
|
|
|
foreach ($files as $field_name => $fieldsets)
|
|
|
|
{
|
|
|
|
foreach ($fieldsets as $fieldset => $fields)
|
|
|
|
{
|
|
|
|
// FIELDSET_ . $file.$field_name.$fieldset
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$plugin->key][$this->hhh
|
|
|
|
. 'FIELDSET_' . $file . $field_name
|
|
|
|
. $fieldset . $this->hhh]
|
|
|
|
= $this->getExtensionFieldsetXML(
|
|
|
|
$plugin, $fields
|
|
|
|
);
|
2019-08-22 01:54:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-08-04 22:38:53 +00:00
|
|
|
// MAINXML
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->fileContentDynamic[$plugin->key][$this->hhh
|
|
|
|
. 'MAINXML' . $this->hhh]
|
|
|
|
= $this->getPluginMainXML($plugin);
|
2020-04-03 18:45:48 +00:00
|
|
|
// Trigger Event: jcb_ce_onAfterInfusePluginData
|
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onAfterInfusePluginData',
|
2020-07-13 02:52:06 +00:00
|
|
|
array(&$this->componentContext, &$plugin, &$this)
|
2020-04-03 18:45:48 +00:00
|
|
|
);
|
2019-08-04 22:38:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-12-06 05:31:32 +00:00
|
|
|
// rest globals
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->target = $_backup_target;
|
|
|
|
$this->lang = $_backup_lang;
|
2019-12-06 05:31:32 +00:00
|
|
|
$this->langPrefix = $_backup_langPrefix;
|
2019-06-22 10:43:26 +00:00
|
|
|
|
2019-08-08 15:35:58 +00:00
|
|
|
// Trigger Event: jcb_ce_onAfterBuildFilesContent
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onAfterBuildFilesContent',
|
|
|
|
array(&$this->componentContext, &$this->componentData,
|
|
|
|
&$this->fileContentStatic, &$this->fileContentDynamic,
|
|
|
|
&$this->placeholders, &$this->hhh)
|
|
|
|
);
|
2019-08-08 15:35:58 +00:00
|
|
|
|
2016-02-26 00:20:09 +00:00
|
|
|
return true;
|
|
|
|
}
|
2020-03-28 13:34:14 +00:00
|
|
|
|
2016-02-26 00:20:09 +00:00
|
|
|
return false;
|
|
|
|
}
|
2017-12-14 23:10:47 +00:00
|
|
|
|
2018-01-19 10:27:47 +00:00
|
|
|
/**
|
|
|
|
* Set the view place holders to global scope
|
2020-03-28 13:34:14 +00:00
|
|
|
*
|
2018-01-19 10:27:47 +00:00
|
|
|
* @param object $view The view settings
|
2020-03-28 13:34:14 +00:00
|
|
|
*
|
2018-01-19 10:27:47 +00:00
|
|
|
* @ return void
|
|
|
|
*/
|
|
|
|
protected function setViewPlaceholders(&$view)
|
|
|
|
{
|
|
|
|
// just to be safe, lets clear previous view placeholders
|
|
|
|
$this->clearFromPlaceHolders('view');
|
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// VIEW <<<DYNAMIC>>>
|
2020-11-17 04:06:34 +00:00
|
|
|
if (isset($view->name_single) && $view->name_single != 'null')
|
2018-01-19 10:27:47 +00:00
|
|
|
{
|
|
|
|
// set main keys
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameSingleCode = $view->name_single_code;
|
2020-11-17 04:06:34 +00:00
|
|
|
$name_single_uppercase = ComponentbuilderHelper::safeString(
|
2020-03-28 13:34:14 +00:00
|
|
|
$view->name_single, 'U'
|
|
|
|
);
|
2020-11-17 04:06:34 +00:00
|
|
|
$name_single_first_uppercase = ComponentbuilderHelper::safeString(
|
2020-03-28 13:34:14 +00:00
|
|
|
$view->name_single, 'F'
|
|
|
|
);
|
2018-01-19 10:27:47 +00:00
|
|
|
|
|
|
|
// set some place holder for the views
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->placeholders[$this->hhh . 'view' . $this->hhh]
|
2020-11-26 17:33:39 +00:00
|
|
|
= $nameSingleCode;
|
2020-11-17 04:06:34 +00:00
|
|
|
$this->placeholders[$this->hhh . 'View' . $this->hhh]
|
|
|
|
= $name_single_first_uppercase;
|
|
|
|
$this->placeholders[$this->hhh . 'VIEW' . $this->hhh]
|
|
|
|
= $name_single_uppercase;
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->placeholders[$this->bbb . 'view' . $this->ddd]
|
2020-11-26 17:33:39 +00:00
|
|
|
= $nameSingleCode;
|
2020-11-17 04:06:34 +00:00
|
|
|
$this->placeholders[$this->bbb . 'View' . $this->ddd]
|
|
|
|
= $name_single_first_uppercase;
|
|
|
|
$this->placeholders[$this->bbb . 'VIEW' . $this->ddd]
|
|
|
|
= $name_single_uppercase;
|
2018-01-19 10:27:47 +00:00
|
|
|
}
|
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// VIEWS <<<DYNAMIC>>>
|
2020-11-17 04:06:34 +00:00
|
|
|
if (isset($view->name_list) && $view->name_list != 'null')
|
2018-01-19 10:27:47 +00:00
|
|
|
{
|
2020-11-26 17:33:39 +00:00
|
|
|
$nameListCode = $view->name_list_code;
|
2020-11-17 04:06:34 +00:00
|
|
|
$name_list_uppercase = ComponentbuilderHelper::safeString(
|
2020-03-28 13:34:14 +00:00
|
|
|
$view->name_list, 'U'
|
|
|
|
);
|
2020-11-17 04:06:34 +00:00
|
|
|
$name_list_first_uppercase = ComponentbuilderHelper::safeString(
|
2020-03-28 13:34:14 +00:00
|
|
|
$view->name_list, 'F'
|
|
|
|
);
|
2018-01-19 10:27:47 +00:00
|
|
|
|
|
|
|
// set some place holder for the views
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->placeholders[$this->hhh . 'views' . $this->hhh]
|
2020-11-26 17:33:39 +00:00
|
|
|
= $nameListCode;
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->placeholders[$this->hhh . 'Views' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $name_list_first_uppercase;
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->placeholders[$this->hhh . 'VIEWS' . $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $name_list_uppercase;
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->placeholders[$this->bbb . 'views' . $this->ddd]
|
2020-11-26 17:33:39 +00:00
|
|
|
= $nameListCode;
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->placeholders[$this->bbb . 'Views' . $this->ddd]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $name_list_first_uppercase;
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->placeholders[$this->bbb . 'VIEWS' . $this->ddd]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $name_list_uppercase;
|
2018-01-19 10:27:47 +00:00
|
|
|
}
|
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// view <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
if (isset($nameSingleCode))
|
2018-01-19 10:27:47 +00:00
|
|
|
{
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh . 'view'
|
2020-03-28 13:34:14 +00:00
|
|
|
. $this->hhh]
|
2020-11-26 17:33:39 +00:00
|
|
|
= $nameSingleCode;
|
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh . 'VIEW'
|
2020-03-28 13:34:14 +00:00
|
|
|
. $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $name_single_uppercase;
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh . 'View'
|
2020-03-28 13:34:14 +00:00
|
|
|
. $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $name_single_first_uppercase;
|
2018-01-19 10:27:47 +00:00
|
|
|
|
2020-11-26 17:33:39 +00:00
|
|
|
if (isset($nameListCode))
|
2018-01-19 10:27:47 +00:00
|
|
|
{
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh . 'view'
|
2020-03-28 13:34:14 +00:00
|
|
|
. $this->hhh]
|
2020-11-26 17:33:39 +00:00
|
|
|
= $nameSingleCode;
|
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh . 'VIEW'
|
2020-03-28 13:34:14 +00:00
|
|
|
. $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $name_single_uppercase;
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh . 'View'
|
2020-03-28 13:34:14 +00:00
|
|
|
. $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $name_single_first_uppercase;
|
2018-01-19 10:27:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-22 19:01:36 +00:00
|
|
|
// views <<<DYNAMIC>>>
|
2020-11-26 17:33:39 +00:00
|
|
|
if (isset($nameListCode))
|
2018-01-19 10:27:47 +00:00
|
|
|
{
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh . 'views'
|
2020-03-28 13:34:14 +00:00
|
|
|
. $this->hhh]
|
2020-11-26 17:33:39 +00:00
|
|
|
= $nameListCode;
|
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh . 'VIEWS'
|
2020-03-28 13:34:14 +00:00
|
|
|
. $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $name_list_uppercase;
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameListCode][$this->hhh . 'Views'
|
2020-03-28 13:34:14 +00:00
|
|
|
. $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $name_list_first_uppercase;
|
2018-01-19 10:27:47 +00:00
|
|
|
|
2020-11-26 17:33:39 +00:00
|
|
|
if (isset($nameSingleCode))
|
2018-01-19 10:27:47 +00:00
|
|
|
{
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-11-17 04:06:34 +00:00
|
|
|
. 'views'
|
2020-03-28 13:34:14 +00:00
|
|
|
. $this->hhh]
|
2020-11-26 17:33:39 +00:00
|
|
|
= $nameListCode;
|
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-11-17 04:06:34 +00:00
|
|
|
. 'VIEWS'
|
2020-03-28 13:34:14 +00:00
|
|
|
. $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $name_list_uppercase;
|
2020-11-26 17:33:39 +00:00
|
|
|
$this->fileContentDynamic[$nameSingleCode][$this->hhh
|
2020-11-17 04:06:34 +00:00
|
|
|
. 'Views'
|
2020-03-28 13:34:14 +00:00
|
|
|
. $this->hhh]
|
2020-11-17 04:06:34 +00:00
|
|
|
= $name_list_first_uppercase;
|
2018-01-19 10:27:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-02-13 23:24:38 +00:00
|
|
|
/**
|
2018-04-13 15:24:06 +00:00
|
|
|
* Build the language values and insert into file
|
2017-02-13 23:24:38 +00:00
|
|
|
*
|
|
|
|
* @return boolean on success
|
2020-03-28 13:34:14 +00:00
|
|
|
*
|
2017-02-13 23:24:38 +00:00
|
|
|
*/
|
|
|
|
public function setLangFileData()
|
|
|
|
{
|
2019-09-04 11:52:31 +00:00
|
|
|
// reset values
|
2020-03-28 13:34:14 +00:00
|
|
|
$values = array();
|
2017-04-05 13:21:10 +00:00
|
|
|
$mainLangLoader = array();
|
|
|
|
// check the admin lang is set
|
|
|
|
if ($this->setLangAdmin())
|
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$values[] = array_values(
|
|
|
|
$this->languages['components'][$this->langTag]['admin']
|
|
|
|
);
|
|
|
|
$mainLangLoader['admin'] = count(
|
|
|
|
$this->languages['components'][$this->langTag]['admin']
|
|
|
|
);
|
2017-04-05 13:21:10 +00:00
|
|
|
}
|
|
|
|
// check the admin system lang is set
|
|
|
|
if ($this->setLangAdminSys())
|
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$values[] = array_values(
|
|
|
|
$this->languages['components'][$this->langTag]['adminsys']
|
|
|
|
);
|
|
|
|
$mainLangLoader['adminsys'] = count(
|
|
|
|
$this->languages['components'][$this->langTag]['adminsys']
|
|
|
|
);
|
2017-04-05 13:21:10 +00:00
|
|
|
}
|
|
|
|
// check the site lang is set
|
2020-03-28 13:34:14 +00:00
|
|
|
if ((!$this->removeSiteFolder || !$this->removeSiteEditFolder)
|
|
|
|
&& $this->setLangSite())
|
2017-04-05 13:21:10 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$values[] = array_values(
|
|
|
|
$this->languages['components'][$this->langTag]['site']
|
|
|
|
);
|
|
|
|
$mainLangLoader['site'] = count(
|
|
|
|
$this->languages['components'][$this->langTag]['site']
|
|
|
|
);
|
2017-04-05 13:21:10 +00:00
|
|
|
}
|
|
|
|
// check the site system lang is set
|
2020-03-28 13:34:14 +00:00
|
|
|
if ((!$this->removeSiteFolder || !$this->removeSiteEditFolder)
|
|
|
|
&& $this->setLangSiteSys())
|
2017-04-05 13:21:10 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$values[] = array_values(
|
|
|
|
$this->languages['components'][$this->langTag]['sitesys']
|
|
|
|
);
|
|
|
|
$mainLangLoader['sitesys'] = count(
|
|
|
|
$this->languages['components'][$this->langTag]['sitesys']
|
|
|
|
);
|
2017-04-05 13:21:10 +00:00
|
|
|
}
|
|
|
|
$values = array_unique(ComponentbuilderHelper::mergeArrays($values));
|
|
|
|
// get the other lang strings if there is any
|
|
|
|
$this->multiLangString = $this->getMultiLangStrings($values);
|
|
|
|
// update insert the current lang in to DB
|
2020-03-24 01:11:43 +00:00
|
|
|
$this->setLangPlaceholders($values, $this->componentID);
|
2017-04-07 20:33:35 +00:00
|
|
|
// remove old unused language strings
|
2020-03-24 01:11:43 +00:00
|
|
|
$this->purgeLanuageStrings($values, $this->componentID);
|
2017-04-05 13:21:10 +00:00
|
|
|
// path to INI file
|
|
|
|
$getPAth = $this->templatePath . '/en-GB.com_admin.ini';
|
2020-03-24 01:11:43 +00:00
|
|
|
// Trigger Event: jcb_ce_onBeforeBuildAllLangFiles
|
2020-03-28 13:34:14 +00:00
|
|
|
$this->triggerEvent(
|
|
|
|
'jcb_ce_onBeforeBuildAllLangFiles',
|
2020-04-23 21:15:07 +00:00
|
|
|
array(&$this->componentContext, &$this->languages['components'],
|
|
|
|
&$this->langTag)
|
2020-03-28 13:34:14 +00:00
|
|
|
);
|
2017-02-13 23:24:38 +00:00
|
|
|
// now we insert the values into the files
|
2020-03-28 13:34:14 +00:00
|
|
|
if (ComponentbuilderHelper::checkArray($this->languages['components']))
|
2017-02-13 23:24:38 +00:00
|
|
|
{
|
2019-06-22 10:43:26 +00:00
|
|
|
// rest xml array
|
2017-04-05 13:21:10 +00:00
|
|
|
$langXML = array();
|
2020-03-28 13:34:14 +00:00
|
|
|
foreach ($this->languages['components'] as $tag => $areas)
|
2017-04-05 13:21:10 +00:00
|
|
|
{
|
2018-04-13 15:24:06 +00:00
|
|
|
// trim the tag
|
|
|
|
$tag = trim($tag);
|
2017-04-05 13:21:10 +00:00
|
|
|
foreach ($areas as $area => $languageStrings)
|
|
|
|
{
|
2017-10-26 16:43:51 +00:00
|
|
|
// set naming convention
|
2017-04-05 13:21:10 +00:00
|
|
|
$p = 'admin';
|
|
|
|
$t = '';
|
|
|
|
if (strpos($area, 'site') !== false)
|
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
if ($this->removeSiteFolder
|
|
|
|
&& $this->removeSiteEditFolder)
|
2017-04-05 13:21:10 +00:00
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$p = 'site';
|
|
|
|
}
|
|
|
|
if (strpos($area, 'sys') !== false)
|
|
|
|
{
|
|
|
|
$t = '.sys';
|
|
|
|
}
|
|
|
|
// build the file name
|
2020-04-03 18:45:48 +00:00
|
|
|
$file_name = $tag . '.com_' . $this->componentCodeName . $t
|
2020-03-28 13:34:14 +00:00
|
|
|
. '.ini';
|
2020-04-03 18:45:48 +00:00
|
|
|
// check if language should be added
|
|
|
|
if ($this->shouldLanguageBeAdded(
|
|
|
|
$tag, $languageStrings, $mainLangLoader[$area],
|
|
|
|
$file_name
|
|
|
|
))
|
2017-04-05 13:21:10 +00:00
|
|
|
{
|
2020-04-03 18:45:48 +00:00
|
|
|
// build the path to place the lang file
|
|
|
|
$path = $this->componentPath . '/' . $p . '/language/'
|
|
|
|
. $tag . '/';
|
|
|
|
if (!JFolder::exists($path))
|
|
|
|
{
|
|
|
|
JFolder::create($path);
|
|
|
|
// count the folder created
|
|
|
|
$this->folderCount++;
|
|
|
|
}
|
|
|
|
// move the file to its place
|
|
|
|
JFile::copy($getPAth, $path . $file_name);
|
|
|
|
// count the file created
|
|
|
|
$this->fileCount++;
|
|
|
|
// add content to it
|
|
|
|
$lang = array_map(
|
|
|
|
function ($langstring, $placeholder) {
|
|
|
|
return $placeholder . '="' . $langstring . '"';
|
|
|
|
}, array_values($languageStrings),
|
|
|
|
array_keys($languageStrings)
|
|
|
|
);
|
|
|
|
// add to language file
|
|
|
|
$this->writeFile(
|
|
|
|
$path . $file_name, implode(PHP_EOL, $lang)
|
|
|
|
);
|
|
|
|
// set the line counter
|
|
|
|
$this->lineCount = $this->lineCount + count(
|
|
|
|
(array) $lang
|
|
|
|
);
|
|
|
|
unset($lang);
|
|
|
|
// build xml strings
|
|
|
|
if (!isset($langXML[$p]))
|
|
|
|
{
|
|
|
|
$langXML[$p] = array();
|
|
|
|
}
|
|
|
|
$langXML[$p][] = '<language tag="' . $tag
|
|
|
|
. '">language/'
|
|
|
|
. $tag . '/' . $file_name . '</language>';
|
2017-04-05 13:21:10 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-06-22 10:43:26 +00:00
|
|
|
// load the lang xml
|
2017-04-05 13:21:10 +00:00
|
|
|
if (ComponentbuilderHelper::checkArray($langXML))
|
2017-02-13 23:24:38 +00:00
|
|
|
{
|
2017-04-05 13:21:10 +00:00
|
|
|
$replace = array();
|
2020-03-28 13:34:14 +00:00
|
|
|
if (isset($langXML['admin'])
|
|
|
|
&& ComponentbuilderHelper::checkArray($langXML['admin']))
|
2017-04-05 13:21:10 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$replace[$this->hhh . 'ADMIN_LANGUAGES' . $this->hhh]
|
|
|
|
= implode(PHP_EOL . $this->_t(3), $langXML['admin']);
|
2017-04-05 13:21:10 +00:00
|
|
|
}
|
2020-03-28 13:34:14 +00:00
|
|
|
if ((!$this->removeSiteFolder || !$this->removeSiteEditFolder)
|
|
|
|
&& isset($langXML['site'])
|
|
|
|
&& ComponentbuilderHelper::checkArray($langXML['site']))
|
2017-04-05 13:21:10 +00:00
|
|
|
{
|
2020-03-28 13:34:14 +00:00
|
|
|
$replace[$this->hhh . 'SITE_LANGUAGES' . $this->hhh]
|
|
|
|
= implode(PHP_EOL . $this->_t(2), $langXML['site']);
|
2017-04-05 13:21:10 +00:00
|
|
|
}
|
|
|
|
// build xml path
|
2020-03-28 13:34:14 +00:00
|
|
|
$xmlPath = $this->componentPath . '/' . $this->componentCodeName
|
|
|
|
. '.xml';
|
2017-04-05 13:21:10 +00:00
|
|
|
// get the content in xml
|
2020-03-28 13:34:14 +00:00
|
|
|
$componentXML = ComponentbuilderHelper::getFileContents(
|
|
|
|
$xmlPath
|
|
|
|
);
|
2017-04-05 13:21:10 +00:00
|
|
|
// update the xml content
|
|
|
|
$componentXML = $this->setPlaceholders($componentXML, $replace);
|
|
|
|
// store the values back to xml
|
2017-12-14 23:10:47 +00:00
|
|
|
$this->writeFile($xmlPath, $componentXML);
|
2017-02-13 23:24:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-05-11 04:08:14 +00:00
|
|
|
|
2016-02-26 00:20:09 +00:00
|
|
|
}
|