Added the feature that allows you to setup the behaviour of a selected set of components that will be auto build and installed. So you do not need to manually compile and install those components any more, the system does all that automatically for you. We have called the feature Expansion Development Method, and it can be set in the global settings of JCB under the Development Method tab.

This commit is contained in:
2018-04-25 00:36:05 +02:00
parent 909a91844f
commit 47d1a6c155
18 changed files with 1525 additions and 82 deletions

View File

@ -668,7 +668,7 @@ class Get
// load the compiler path
$this->compilerPath = $this->params->get('compiler_folder_path', JPATH_COMPONENT_ADMINISTRATOR . '/compiler');
// set the component ID
$this->componentID = (int) $config['componentId'];
$this->componentID = (int) $config['component'];
// set this components code name
if ($name_code = ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'name_code'))
{
@ -678,10 +678,10 @@ class Get
$this->componentCodeName = ComponentbuilderHelper::safeString($name_code);
// set if placeholders should be added to customcode
$global = ((int) ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'add_placeholders') == 1) ? true : false;
$this->addPlaceholders = ((int) $config['addPlaceholders'] == 0) ? false : (((int) $config['addPlaceholders'] == 1) ? true : $global);
$this->addPlaceholders = ((int) $config['placeholders'] == 0) ? false : (((int) $config['placeholders'] == 1) ? true : $global);
// set if line numbers should be added to comments
$global = ((int) ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'debug_linenr') == 1) ? true : false;
$this->debugLinenr = ((int) $config['debugLinenr'] == 0) ? false : (((int) $config['debugLinenr'] == 1) ? true : $global);
$this->debugLinenr = ((int) $config['debuglinenr'] == 0) ? false : (((int) $config['debuglinenr'] == 1) ? true : $global);
// set the current user
$this->user = JFactory::getUser();
// Get a db connection.

View File

@ -338,9 +338,9 @@ class Structure extends Get
// run global updater
ComponentbuilderHelper::runGlobalUpdater();
// set the Joomla version
$this->joomlaVersion = $config['joomlaVersion'];
$this->joomlaVersion = $config['version'];
// set the template path
$this->templatePath = $this->compilerPath . '/joomla_' . $config['joomlaVersion'];
$this->templatePath = $this->compilerPath . '/joomla_' . $config['version'];
// set some default names
$this->componentSalesName = 'com_' . $this->componentData->sales_name . '__J' . $this->joomlaVersion;
$this->componentBackupName = 'com_' . $this->componentData->sales_name . '_v' . str_replace('.', '_', $this->componentData->component_version) . '__J' . $this->joomlaVersion;

View File

@ -13048,12 +13048,6 @@ class Interpretation extends Fields
$tabCode = ComponentbuilderHelper::safeString($tab) . '_custom_config';
$tabUpper = ComponentbuilderHelper::safeString($tab, 'U');
$tabLower = ComponentbuilderHelper::safeString($tab);
// setup lang
$this->langContent[$this->lang][$lang . '_' . $tabUpper] = $tab;
// start field set
$this->configFieldSets[] = "\t<fieldset";
$this->configFieldSets[] = "\t\t" . 'name="' . $tabCode . '"';
$this->configFieldSets[] = "\t\t" . 'label="' . $lang . '_' . $tabUpper . '">';
// remove display targeted fields
$bucket = array();
foreach ($tabFields as $tabField)
@ -13065,10 +13059,20 @@ class Interpretation extends Fields
$bucket[] = str_replace('display="config"', '', $tabField);
}
}
// set the fields
$this->configFieldSets[] = implode("", $bucket);
// close field set
$this->configFieldSets[] = "\t</fieldset>";
// only add the tab if it has values
if (ComponentbuilderHelper::checkArray($bucket))
{
// setup lang
$this->langContent[$this->lang][$lang . '_' . $tabUpper] = $tab;
// start field set
$this->configFieldSets[] = "\t<fieldset";
$this->configFieldSets[] = "\t\t" . 'name="' . $tabCode . '"';
$this->configFieldSets[] = "\t\t" . 'label="' . $lang . '_' . $tabUpper . '">';
// set the fields
$this->configFieldSets[] = implode("", $bucket);
// close field set
$this->configFieldSets[] = "\t</fieldset>";
}
// remove after loading
unset($this->configFieldSetsCustomField[$tab]);
}

View File

@ -1175,7 +1175,7 @@ class Infusion extends Interpretation
// add to language file
$this->writeFile($path . '/' . $fileName, implode(PHP_EOL, $lang));
// set the line counter
$this->lineCount = $this->lineCount + substr_count($lang, PHP_EOL);
$this->lineCount = $this->lineCount + count((array)$lang);
// build xml strings
if (!isset($langXML[$p]))
{