Fixed gh-467 so that the XML build of fields will work correctly with the new groupedlist field type. Added placeholders to class comments.

This commit is contained in:
Llewellyn van der Merwe 2019-08-26 08:54:16 +02:00
parent d2f94d84fa
commit 9fcc5c3930
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
7 changed files with 41 additions and 15 deletions

View File

@ -146,14 +146,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 22nd August, 2019
+ *Last Build*: 26th August, 2019
+ *Version*: 2.10.0
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **247612**
+ *Line count*: **247882**
+ *Field count*: **1343**
+ *File count*: **1604**
+ *Folder count*: **250**
+ *File count*: **1608**
+ *Folder count*: **253**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -146,14 +146,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 22nd August, 2019
+ *Last Build*: 26th August, 2019
+ *Version*: 2.10.0
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **247612**
+ *Line count*: **247882**
+ *Field count*: **1343**
+ *File count*: **1604**
+ *Folder count*: **250**
+ *File count*: **1608**
+ *Folder count*: **253**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -6283,6 +6283,14 @@ class Get
$plugin->file_name = strtolower($plugin->code_name);
// set official_name lang strings
$this->setLangContent($plugin->key, $this->langPrefix, $plugin->official_name);
// set some placeholder for this plugin
$this->placeholders[$this->bbb . 'Plugin_name' . $this->ddd] = $plugin->official_name;
$this->placeholders[$this->bbb . 'Plugin' . $this->ddd] = ucfirst($plugin->code_name);
$this->placeholders[$this->bbb . 'plugin' . $this->ddd] = strtolower($plugin->code_name);
$this->placeholders[$this->bbb . 'Plugin_group' . $this->ddd] = ucfirst($plugin->group);
$this->placeholders[$this->bbb . 'plugin_group' . $this->ddd] = strtolower($plugin->group);
$this->placeholders[$this->bbb . 'plugin.version' . $this->ddd] = $plugin->plugin_version;
$this->placeholders[$this->bbb . 'plugin_version' . $this->ddd] = str_replace('.', '_', $plugin->plugin_version);
// set description (TODO) add description field to plugin
if (!isset($plugin->description) || !ComponentbuilderHelper::checkString($plugin->description))
{
@ -6592,6 +6600,14 @@ class Get
$this->lang = $_backup_lang;
$this->langPrefix = $_backup_langPrefix;
unset($this->placeholders[$this->bbb . 'Plugin_name' . $this->ddd]);
unset($this->placeholders[$this->bbb . 'Plugin' . $this->ddd]);
unset($this->placeholders[$this->bbb . 'plugin' . $this->ddd]);
unset($this->placeholders[$this->bbb . 'Plugin_group' . $this->ddd]);
unset($this->placeholders[$this->bbb . 'plugin_group' . $this->ddd]);
unset($this->placeholders[$this->bbb . 'plugin.version' . $this->ddd]);
unset($this->placeholders[$this->bbb . 'plugin_version' . $this->ddd]);
$this->joomlaPlugins[$id] = $plugin;
return true;

View File

@ -1800,7 +1800,7 @@ class Fields extends Structure
foreach ($grouped_[$key_][$_id] as $option_)
{
$groupOptionXML = $groupXML->fieldXML->addChild('option');
$groupOptionXML = $groupXML->addChild('option');
$groupOptionXML->addAttribute('value', $option_['value']);
$groupOptionXML[] = $option_['text'];
}

View File

@ -361,7 +361,9 @@ abstract class ComponentbuilderHelper
{
// set the correct order
ksort($comment);
return implode(PHP_EOL, $comment);
$replace = array('Foo' => '[[[Plugin_name]]]', '[PACKAGE_NAME]' => '[[[Plugin]]]', '1.0.0' => '[[[plugin.version]]]', '1.0' => '[[[plugin.version]]]');
// now update with JCB placeholders
return str_replace(array_keys($replace), array_values($replace), implode(PHP_EOL, $comment));
}
}
}
@ -5214,6 +5216,9 @@ abstract class ComponentbuilderHelper
&& ($timestamp >= ~PHP_INT_MAX);
}
// Privacy integration with Joomla Privacy suite
/**
* Load the Component xml manifest.
**/

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_COMPONENTBUILDER</name>
<creationDate>22nd August, 2019</creationDate>
<creationDate>26th August, 2019</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>

View File

@ -361,7 +361,9 @@ abstract class ComponentbuilderHelper
{
// set the correct order
ksort($comment);
return implode(PHP_EOL, $comment);
$replace = array('Foo' => '[[[Plugin_name]]]', '[PACKAGE_NAME]' => '[[[Plugin]]]', '1.0.0' => '[[[plugin.version]]]', '1.0' => '[[[plugin.version]]]');
// now update with JCB placeholders
return str_replace(array_keys($replace), array_values($replace), implode(PHP_EOL, $comment));
}
}
}
@ -5215,6 +5217,9 @@ abstract class ComponentbuilderHelper
}
// Privacy integration with Joomla Privacy suite
public static function jsonToString($value, $sperator = ", ", $table = null, $id = 'id', $name = 'name')
{
// do some table foot work