Compare commits

...

16 Commits

Author SHA1 Message Date
36d0eb98ee Release of v3.2.2
Fix auto build from SQL in Joomla 4 and 5. Fix permission issue for admin views. Add extending options to interfaces. Update the Schema class to also update null mismatching if needed. Add repositories for better integration with gitea. Refactored the Data classes. Add new Data classes. Add new subform classes. Fix registry class methods return type. Update all list and custom fields to use the new layouts. Add push options to Joomla Power. Complete the Joomla Power Init and Reset features. Fix Gitea Contents class functions. Fix subform set methods. Improved the Joomla Power Push path. Fix the metadata, metadesc, metakey database issue. Fix function mismatch call in the compiler power class. Fix init feature to only add missing powers. Fix controller postSaveHook function, for correct model class in Joomla 4 and 5. Fix app instances (mismatch) in the install script and schema class when installing from CLI. Add option to use placeholders in Joomla Power namespaces. Fix subform layout of uikit in JCB.
2024-07-20 22:39:19 +02:00
af6649d9ca Release of v3.2.2-rc1
Final testing for stable release!.
2024-07-19 17:29:53 +02:00
15a4678a59 Release of v3.2.2-beta5
Add option to use placeholders in Joomla Power namespaces.
2024-07-19 12:35:06 +02:00
49d2a0bdf4 Update on v3.2.2-beta4 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-18 21:10:14 +02:00
a1705c5360 Release of v3.2.2-beta4
Fix app instances (mismatch) in the install script and schema class when installing from CLI.
2024-07-18 20:48:51 +02:00
b4792c097c Release of v3.2.2-beta3
Fix init feature to only add missing powers. Fix controller postSaveHook function, for correct model class in Joomla 4 and 5.
2024-07-18 17:11:47 +02:00
cab8ffa122 Update on v3.2.2-beta2 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
2024-07-18 14:57:53 +02:00
421bb93ba4 Release of v3.2.2-beta2
Fix function mismatch call in the compiler power class.
2024-07-17 14:55:57 +02:00
b656269527 Release of v3.2.2-beta1
Fix subform set methods. Improved the Joomla Power Push path. Fix the metadata, metadesc, metakey database issue.
2024-07-17 02:39:35 +02:00
9e59163661 Release of v3.2.2-alpha7
Add push options to Joomla Power. Complete the Joomla Power Init and Reset features. Fix Gitea Contents class functions. Last Alpha release (feature block).
2024-07-08 22:53:46 +02:00
1d417c40f1 Release of v3.2.2-alpha6
Add new subform classes. Fix registry class methods return type. Update all list and custom fields to use the new layouts.
2024-06-28 03:48:57 +02:00
7a680bb734 Release of v3.2.2-alpha5
Add repositories for better integration with gitea. Refactored the Data classes. Add new Data classes.
2024-06-21 01:32:05 +02:00
894d691897 Release of v3.2.2-alpha4
Update the Schema class to also update null mismatching if needed.
2024-06-07 23:03:20 +02:00
b67e534b9f Release of v3.2.2-alpha3
Fix permission issue for admin views. Add extending options to interfaces.
2024-06-05 16:29:28 +02:00
dfaaf15ca9 Release of v3.2.2-alpha2
Fix permission issue for admin views.
2024-05-16 15:13:36 +02:00
f8d6607392 Release of v3.2.2-alpha1
Fix auto build from SQL in Joomla 4 and 5.
2024-05-13 12:23:57 +02:00
328 changed files with 19730 additions and 9378 deletions

View File

@ -1,3 +1,28 @@
# v3.2.2
- Fix auto build from SQL in Joomla 4 and 5.
- Fix permission issue for admin views.
- Add extending options to interfaces.
- Update the Schema class to also update null mismatching if needed
- Add repositories for better integration with gitea
- Refactored the Data classes
- Add new Data classes
- Add new subform classes
- Fix registry class methods return type
- Update all list and custom fields to use the new layouts
- Add push options to Joomla Power
- Complete the Joomla Power Init and Reset features
- Fix Gitea Contents class functions
- Fix subform set methods
- Improved the Joomla Power Push path
- Fix the metadata, metadesc, metakey database issue
- Fix function mismatch call in the compiler power class.
- Fix init feature to only add missing powers
- Fix controller postSaveHook function, for correct model class in Joomla 4 and 5
- Fix app instances (mismatch) in the install script and schema class when installing from CLI
- Add option to use placeholders in Joomla Power namespaces.
- Fix subform layout of uikit in JCB
# v3.2.1 # v3.2.1
- Add power path override option on component level. - Add power path override option on component level.

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.1) with **ALL** its features and **ALL** concepts totally open-source and free! You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.2) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -144,14 +144,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 10th May, 2024 + *Last Build*: 20th July, 2024
+ *Version*: 3.2.1 + *Version*: 3.2.2
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **761616** + *Line count*: **796047**
+ *Field count*: **2097** + *Field count*: **2104**
+ *File count*: **5292** + *File count*: **5469**
+ *Folder count*: **471** + *Folder count*: **482**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have! Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.1) with **ALL** its features and **ALL** concepts totally open-source and free! You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (3.2.2) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45) > Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -144,14 +144,14 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io) + *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder) + *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 10th May, 2024 + *Last Build*: 20th July, 2024
+ *Version*: 3.2.1 + *Version*: 3.2.2
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **761616** + *Line count*: **796047**
+ *Field count*: **2097** + *Field count*: **2104**
+ *File count*: **5292** + *File count*: **5469**
+ *Folder count*: **471** + *Folder count*: **482**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com). > This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](https://www.joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io) > Developed by [Llewellyn van der Merwe](mailto:joomla@vdm.io)

View File

@ -419,6 +419,7 @@
<action name="joomla_plugin_updates.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE_DESC" /> <action name="joomla_plugin_updates.edit.state" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_STATE_DESC" />
<action name="joomla_plugin_updates.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION_DESC" /> <action name="joomla_plugin_updates.version" title="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION" description="COM_COMPONENTBUILDER_JOOMLA_PLUGINS_UPDATES_EDIT_VERSION_DESC" />
<action name="joomla_power.init" title="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS_DESC" /> <action name="joomla_power.init" title="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS_DESC" />
<action name="joomla_power.push" title="COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS_DESC" />
<action name="joomla_power.reset" title="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC" /> <action name="joomla_power.reset" title="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC" />
<action name="joomla_power.access" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS_DESC" /> <action name="joomla_power.access" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_ACCESS_DESC" />
<action name="joomla_power.batch" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE_DESC" /> <action name="joomla_power.batch" title="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE" description="COM_COMPONENTBUILDER_JOOMLA_POWERS_BATCH_USE_DESC" />
@ -521,6 +522,18 @@
<action name="power.edit.state" title="COM_COMPONENTBUILDER_POWERS_EDIT_STATE" description="COM_COMPONENTBUILDER_POWERS_EDIT_STATE_DESC" /> <action name="power.edit.state" title="COM_COMPONENTBUILDER_POWERS_EDIT_STATE" description="COM_COMPONENTBUILDER_POWERS_EDIT_STATE_DESC" />
<action name="power.version" title="COM_COMPONENTBUILDER_POWERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_POWERS_EDIT_VERSION_DESC" /> <action name="power.version" title="COM_COMPONENTBUILDER_POWERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_POWERS_EDIT_VERSION_DESC" />
<action name="power.submenu" title="COM_COMPONENTBUILDER_POWERS_SUBMENU" description="COM_COMPONENTBUILDER_POWERS_SUBMENU_DESC" /> <action name="power.submenu" title="COM_COMPONENTBUILDER_POWERS_SUBMENU" description="COM_COMPONENTBUILDER_POWERS_SUBMENU_DESC" />
<action name="repository.access" title="COM_COMPONENTBUILDER_REPOSITORIES_ACCESS" description="COM_COMPONENTBUILDER_REPOSITORIES_ACCESS_DESC" />
<action name="repository.batch" title="COM_COMPONENTBUILDER_REPOSITORIES_BATCH_USE" description="COM_COMPONENTBUILDER_REPOSITORIES_BATCH_USE_DESC" />
<action name="repository.create" title="COM_COMPONENTBUILDER_REPOSITORIES_CREATE" description="COM_COMPONENTBUILDER_REPOSITORIES_CREATE_DESC" />
<action name="repository.dashboard_list" title="COM_COMPONENTBUILDER_REPOSITORIES_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_REPOSITORIES_DASHBOARD_LIST_DESC" />
<action name="repository.delete" title="COM_COMPONENTBUILDER_REPOSITORIES_DELETE" description="COM_COMPONENTBUILDER_REPOSITORIES_DELETE_DESC" />
<action name="repository.edit" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_DESC" />
<action name="repository.edit.created_by" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY_DESC" />
<action name="repository.edit.created" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE_DESC" />
<action name="repository.edit.own" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN_DESC" />
<action name="repository.edit.state" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE_DESC" />
<action name="repository.version" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION_DESC" />
<action name="repository.submenu" title="COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU" description="COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU_DESC" />
<action name="search.access" title="COM_COMPONENTBUILDER_SEARCH_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC" /> <action name="search.access" title="COM_COMPONENTBUILDER_SEARCH_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC" />
<action name="search.compiler" title="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS_DESC" /> <action name="search.compiler" title="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS" description="COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS_DESC" />
<action name="search.dashboard_list" title="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST_DESC" /> <action name="search.dashboard_list" title="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST" description="COM_COMPONENTBUILDER_SEARCH_DASHBOARD_LIST_DESC" />
@ -814,6 +827,17 @@
<action name="server.access" title="COM_COMPONENTBUILDER_SERVERS_ACCESS" description="COM_COMPONENTBUILDER_SERVERS_ACCESS_DESC" /> <action name="server.access" title="COM_COMPONENTBUILDER_SERVERS_ACCESS" description="COM_COMPONENTBUILDER_SERVERS_ACCESS_DESC" />
<action name="server.version" title="COM_COMPONENTBUILDER_SERVERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_SERVERS_EDIT_VERSION_DESC" /> <action name="server.version" title="COM_COMPONENTBUILDER_SERVERS_EDIT_VERSION" description="COM_COMPONENTBUILDER_SERVERS_EDIT_VERSION_DESC" />
</section> </section>
<section name="repository">
<action name="repository.edit" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_DESC" />
<action name="repository.edit.own" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN_DESC" />
<action name="repository.edit.state" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE_DESC" />
<action name="repository.edit.created_by" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY_DESC" />
<action name="repository.edit.created" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE_DESC" />
<action name="repository.create" title="COM_COMPONENTBUILDER_REPOSITORIES_CREATE" description="COM_COMPONENTBUILDER_REPOSITORIES_CREATE_DESC" />
<action name="repository.delete" title="COM_COMPONENTBUILDER_REPOSITORIES_DELETE" description="COM_COMPONENTBUILDER_REPOSITORIES_DELETE_DESC" />
<action name="repository.access" title="COM_COMPONENTBUILDER_REPOSITORIES_ACCESS" description="COM_COMPONENTBUILDER_REPOSITORIES_ACCESS_DESC" />
<action name="repository.version" title="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION" description="COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION_DESC" />
</section>
<section name="help_document"> <section name="help_document">
<action name="help_document.edit" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_DESC" /> <action name="help_document.edit" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_DESC" />
<action name="help_document.edit.own" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_OWN" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_OWN_DESC" /> <action name="help_document.edit.own" title="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_OWN" description="COM_COMPONENTBUILDER_HELP_DOCUMENTS_EDIT_OWN_DESC" />

View File

@ -0,0 +1,13 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

View File

@ -0,0 +1,13 @@
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/* CSS Document */

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
###CUSTOM_POWER_AUTOLOADER### ###POWER_AUTOLOADER###
###ADMIN_HELPER_CLASS_HEADER### ###ADMIN_HELPER_CLASS_HEADER###

View File

@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
###SITE_CUSTOM_POWER_AUTOLOADER### ###SITE_POWER_AUTOLOADER###
###SITE_HELPER_CLASS_HEADER### ###SITE_HELPER_CLASS_HEADER###

View File

@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
###CUSTOM_POWER_AUTOLOADER### ###POWER_AUTOLOADER###
###ADMIN_COMPONENT_HEADER### ###ADMIN_COMPONENT_HEADER###

View File

@ -17,7 +17,7 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
###SITE_CUSTOM_POWER_AUTOLOADER### ###SITE_POWER_AUTOLOADER###
###SITE_COMPONENT_HEADER### ###SITE_COMPONENT_HEADER###

View File

@ -138,77 +138,78 @@ class Com_###Component###InstallerScript
} }
/** /**
* Remove folders with files * Remove folders with files (with ignore options)
* *
* @param string $dir The path to folder to remove * @param string $dir The path to the folder to remove.
* @param boolean $ignore The folders and files to ignore and not remove * @param array|null $ignore The folders and files to ignore and not remove.
*
* @return boolean True in all is removed
* *
* @return bool True if all specified files/folders are removed, false otherwise.
* @since 3.2.2
*/ */
protected function removeFolder($dir, $ignore = false) protected function removeFolder(string $dir, ?array $ignore = null): bool
{ {
if (Folder::exists($dir)) if (!is_dir($dir))
{ {
$it = new RecursiveDirectoryIterator($dir); return false;
$it = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST); }
// remove ending /
$it = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
$it = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::CHILD_FIRST);
// Remove trailing slash
$dir = rtrim($dir, '/'); $dir = rtrim($dir, '/');
// now loop the files & folders
foreach ($it as $file) foreach ($it as $file)
{ {
if ('.' === $file->getBasename() || '..' === $file->getBasename()) continue; $filePath = $file->getPathname();
// set file dir $relativePath = str_replace($dir . '/', '', $filePath);
$file_dir = $file->getPathname();
// check if this is a dir or a file if ($ignore !== null && in_array($relativePath, $ignore, true))
if ($file->isDir())
{
$keeper = false;
if ($this->checkArray($ignore))
{
foreach ($ignore as $keep)
{
if (strpos($file_dir, $dir.'/'.$keep) !== false)
{
$keeper = true;
}
}
}
if ($keeper)
{ {
continue; continue;
} }
Folder::delete($file_dir);
if ($file->isDir())
{
Folder::delete($filePath);
} }
else else
{ {
$keeper = false; File::delete($filePath);
if ($this->checkArray($ignore))
{
foreach ($ignore as $keep)
{
if (strpos($file_dir, $dir.'/'.$keep) !== false)
{
$keeper = true;
} }
} }
}
if ($keeper) // Delete the root folder if there are no ignored files/folders left
{ if ($ignore === null || $this->isDirEmpty($dir, $ignore))
continue;
}
File::delete($file_dir);
}
}
// delete the root folder if not ignore found
if (!$this->checkArray($ignore))
{ {
return Folder::delete($dir); return Folder::delete($dir);
} }
return true; return true;
} }
/**
* Check if a directory is empty considering ignored files/folders.
*
* @param string $dir The path to the folder to check.
* @param array $ignore The folders and files to ignore.
*
* @return bool True if the directory is empty or contains only ignored items, false otherwise.
* @since 3.2.1
*/
protected function isDirEmpty(string $dir, array $ignore): bool
{
$it = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
foreach ($it as $file)
{
$relativePath = str_replace($dir . '/', '', $file->getPathname());
if (!in_array($relativePath, $ignore, true))
{
return false; return false;
} }
}
return true;
}
/** /**
* Check if have an array with a length * Check if have an array with a length
@ -216,6 +217,7 @@ class Com_###Component###InstallerScript
* @input array The array to check * @input array The array to check
* *
* @returns bool/int number of items in array on success * @returns bool/int number of items in array on success
* @since 3.2.2
*/ */
protected function checkArray($array, $removeEmptyString = false) protected function checkArray($array, $removeEmptyString = false)
{ {
@ -236,5 +238,29 @@ class Com_###Component###InstallerScript
return $nr; return $nr;
} }
return false; return false;
}
/**
* Ensures that a class in the namespace is available.
* If the class is not already loaded, it attempts to load it via the specified autoloader.
*
* @param string $className The fully qualified name of the class to check.
*
* @return bool True if the class exists or was successfully loaded, false otherwise.
* @since 3.2.2
*/
protected function classExists(string $className): bool
{
if (!class_exists($className, true))
{
###THREE_POWER_AUTOLOADER###
// Check again if the class now exists after requiring the autoloader
if (!class_exists($className, true))
{
return false;
}
}
return true;
}###INSTALLERMETHODS### }###INSTALLERMETHODS###
} }

View File

@ -15,7 +15,7 @@ defined('_JCB_TEMPLATE') or die;
###BOM### ###BOM###
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper; namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper;
###CUSTOM_POWER_AUTOLOADER### ###POWER_AUTOLOADER###
###ADMIN_HELPER_CLASS_HEADER### ###ADMIN_HELPER_CLASS_HEADER###

View File

@ -14,7 +14,7 @@ defined('_JCB_TEMPLATE') or die;
?> ?>
###BOM### ###BOM###
###CUSTOM_POWER_AUTOLOADER### ###POWER_AUTOLOADER###
// (soon) use Joomla\CMS\Association\AssociationExtensionInterface; // (soon) use Joomla\CMS\Association\AssociationExtensionInterface;
use Joomla\CMS\Categories\CategoryFactoryInterface; use Joomla\CMS\Categories\CategoryFactoryInterface;
@ -55,10 +55,10 @@ return new class () implements ServiceProviderInterface
{ {
// (soon) $container->set(AssociationExtensionInterface::class, new AssociationsHelper()); // (soon) $container->set(AssociationExtensionInterface::class, new AssociationsHelper());
$container->registerServiceProvider(new CategoryFactory('\\###NAMESPACEPREFIX###\\Component\\###Component###')); $container->registerServiceProvider(new CategoryFactory('\\###NAMESPACEPREFIX###\\Component\\###ComponentNamespace###'));
$container->registerServiceProvider(new MVCFactory('\\###NAMESPACEPREFIX###\\Component\\###Component###')); $container->registerServiceProvider(new MVCFactory('\\###NAMESPACEPREFIX###\\Component\\###ComponentNamespace###'));
$container->registerServiceProvider(new ComponentDispatcherFactory('\\###NAMESPACEPREFIX###\\Component\\###Component###')); $container->registerServiceProvider(new ComponentDispatcherFactory('\\###NAMESPACEPREFIX###\\Component\\###ComponentNamespace###'));
$container->registerServiceProvider(new RouterFactory('\\###NAMESPACEPREFIX###\\Component\\###Component###')); $container->registerServiceProvider(new RouterFactory('\\###NAMESPACEPREFIX###\\Component\\###ComponentNamespace###'));
$container->set( $container->set(
ComponentInterface::class, ComponentInterface::class,

View File

@ -261,7 +261,7 @@ class ###View###Controller extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -19,7 +19,6 @@ use Joomla\CMS\Language\Text;
use Joomla\CMS\Filesystem\File; use Joomla\CMS\Filesystem\File;
use Joomla\CMS\Installer\InstallerAdapter; use Joomla\CMS\Installer\InstallerAdapter;
use Joomla\CMS\Installer\InstallerScriptInterface; use Joomla\CMS\Installer\InstallerScriptInterface;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Log\Log; use Joomla\CMS\Log\Log;
use Joomla\CMS\Version; use Joomla\CMS\Version;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
@ -39,7 +38,6 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
/** /**
* The CMS Application. * The CMS Application.
* *
* @var CMSApplication
* @since 4.4.2 * @since 4.4.2
*/ */
protected $app; protected $app;
@ -279,6 +277,80 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
return true; return true;
} }
/**
* Remove folders with files (with ignore options)
*
* @param string $dir The path to the folder to remove.
* @param array|null $ignore The folders and files to ignore and not remove.
*
* @return bool True if all specified files/folders are removed, false otherwise.
* @since 3.2.2
*/
protected function removeFolder(string $dir, ?array $ignore = null): bool
{
if (!is_dir($dir))
{
return false;
}
$it = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
$it = new \RecursiveIteratorIterator($it, \RecursiveIteratorIterator::CHILD_FIRST);
// Remove trailing slash
$dir = rtrim($dir, '/');
foreach ($it as $file)
{
$filePath = $file->getPathname();
$relativePath = str_replace($dir . '/', '', $filePath);
if ($ignore !== null && in_array($relativePath, $ignore, true))
{
continue;
}
if ($file->isDir())
{
Folder::delete($filePath);
}
else
{
File::delete($filePath);
}
}
// Delete the root folder if there are no ignored files/folders left
if ($ignore === null || $this->isDirEmpty($dir, $ignore))
{
return Folder::delete($dir);
}
return true;
}
/**
* Check if a directory is empty considering ignored files/folders.
*
* @param string $dir The path to the folder to check.
* @param array $ignore The folders and files to ignore.
*
* @return bool True if the directory is empty or contains only ignored items, false otherwise.
* @since 3.2.1
*/
protected function isDirEmpty(string $dir, array $ignore): bool
{
$it = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS);
foreach ($it as $file)
{
$relativePath = str_replace($dir . '/', '', $file->getPathname());
if (!in_array($relativePath, $ignore, true))
{
return false;
}
}
return true;
}
/** /**
* Remove the files and folders in the given array from * Remove the files and folders in the given array from
* *
@ -1095,5 +1167,29 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
); );
} }
} }
}
/**
* Ensures that a class in the namespace is available.
* If the class is not already loaded, it attempts to load it via the specified autoloader.
*
* @param string $className The fully qualified name of the class to check.
*
* @return bool True if the class exists or was successfully loaded, false otherwise.
* @since 4.0.1
*/
protected function classExists(string $className): bool
{
if (!class_exists($className, true))
{
###THREE_POWER_AUTOLOADER###
// Check again if the class now exists after requiring the autoloader
if (!class_exists($className, true))
{
return false;
}
}
return true;
}###INSTALLERMETHODS### }###INSTALLERMETHODS###
} }

View File

@ -277,7 +277,7 @@ class ###View###Controller extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param BaseDatabaseModel &$model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void

View File

@ -15,7 +15,7 @@ defined('_JCB_TEMPLATE') or die;
###BOM### ###BOM###
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Helper; namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Helper;
###SITE_CUSTOM_POWER_AUTOLOADER### ###SITE_POWER_AUTOLOADER###
###SITE_HELPER_CLASS_HEADER### ###SITE_HELPER_CLASS_HEADER###

View File

@ -107,14 +107,14 @@ class ###SView###Controller extends FormController
* Function that allows child controller access to model data * Function that allows child controller access to model data
* after the data has been saved. * after the data has been saved.
* *
* @param JModelLegacy $model The data model object. * @param BaseDatabaseModel $model The data model object.
* @param array $validData The validated data. * @param array $validData The validated data.
* *
* @return void * @return void
* *
* @since 12.2 * @since 12.2
*/ */
protected function postSaveHook(JModelLegacy $model, $validData = []) protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{ {
} }
} }

View File

@ -134,6 +134,19 @@
folder="editors" folder="editors"
filter="cmd" filter="cmd"
/> />
<!-- Gitea_username Field. Type: Text. (joomla) -->
<field
type="text"
name="gitea_username"
label="COM_COMPONENTBUILDER_CONFIG_GITEA_USERNAME_LABEL"
size="128"
maxlength="50"
description="COM_COMPONENTBUILDER_CONFIG_GITEA_USERNAME_DESCRIPTION"
class="text_area"
filter="STRING"
message="COM_COMPONENTBUILDER_CONFIG_GITEA_USERNAME_MESSAGE"
hint="COM_COMPONENTBUILDER_CONFIG_GITEA_USERNAME_HINT"
/>
<!-- Gitea_token Field. Type: Password. (joomla) --> <!-- Gitea_token Field. Type: Password. (joomla) -->
<field <field
type="password" type="password"
@ -189,6 +202,7 @@
label="COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL" label="COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="true" multiple="true"
default="" default=""
showon="manage_jcb_package_directories:1"> showon="manage_jcb_package_directories:1">
@ -222,6 +236,7 @@
label="COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_LABEL" label="COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="global" default="global"
showon="set_browser_storage:1"> showon="set_browser_storage:1">
@ -743,62 +758,7 @@
COM_COMPONENTBUILDER_CONFIG_NO</option> COM_COMPONENTBUILDER_CONFIG_NO</option>
</field> </field>
<!-- Note_super_powers_repositories Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_super_powers_repositories Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_super_powers_repositories" label="COM_COMPONENTBUILDER_CONFIG_NOTE_SUPER_POWERS_REPOSITORIES_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_SUPER_POWERS_REPOSITORIES_DESCRIPTION" heading="h4" class="alert alert-info note_super_powers_repositories" showon="powers_repository:1[AND]super_powers_repositories:1" /> <field type="note" name="note_super_powers_repositories" label="COM_COMPONENTBUILDER_CONFIG_NOTE_SUPER_POWERS_REPOSITORIES_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_SUPER_POWERS_REPOSITORIES_DESCRIPTION" heading="h4" class="alert alert-error note_super_powers_repositories" showon="powers_repository:1[AND]super_powers_repositories:1" />
<!-- Approved_paths Field. Type: Subform. (joomla) -->
<field
type="subform"
name="approved_paths"
label="COM_COMPONENTBUILDER_CONFIG_APPROVED_PATHS_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
icon="list"
max="30"
min="1"
showon="powers_repository:1[AND]super_powers_repositories:1">
<form hidden="true" name="list_approved_paths_modal" repeat="true">
<!-- Owner Field. Type: Text. (joomla) -->
<field
type="text"
name="owner"
label="COM_COMPONENTBUILDER_CONFIG_OWNER_LABEL"
size="70"
maxlength="150"
class="text_area span12"
readonly="false"
filter="CMD"
hint="COM_COMPONENTBUILDER_CONFIG_OWNER_HINT"
autocomplete="on"
/>
<!-- Repo Field. Type: Text. (joomla) -->
<field
type="text"
name="repo"
label="COM_COMPONENTBUILDER_CONFIG_REPO_LABEL"
size="70"
maxlength="150"
class="text_area span12"
readonly="false"
filter="CMD"
hint="COM_COMPONENTBUILDER_CONFIG_REPO_HINT"
autocomplete="on"
/>
<!-- Branch Field. Type: Text. (joomla) -->
<field
type="text"
name="branch"
label="COM_COMPONENTBUILDER_CONFIG_BRANCH_LABEL"
size="70"
maxlength="150"
default="default"
class="text_area span12"
readonly="false"
filter="CMD"
hint="COM_COMPONENTBUILDER_CONFIG_BRANCH_HINT"
autocomplete="on"
/>
</form>
</field>
<!-- Note_powers_repository_path Field. Type: Note. A None Database Field. (joomla) --> <!-- Note_powers_repository_path Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_powers_repository_path" label="COM_COMPONENTBUILDER_CONFIG_NOTE_POWERS_REPOSITORY_PATH_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_POWERS_REPOSITORY_PATH_DESCRIPTION" heading="h4" class="alert alert-info note_powers_repository_path" showon="powers_repository:1" /> <field type="note" name="note_powers_repository_path" label="COM_COMPONENTBUILDER_CONFIG_NOTE_POWERS_REPOSITORY_PATH_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_POWERS_REPOSITORY_PATH_DESCRIPTION" heading="h4" class="alert alert-info note_powers_repository_path" showon="powers_repository:1" />
<!-- Local_powers_repository_path Field. Type: Text. (joomla) --> <!-- Local_powers_repository_path Field. Type: Text. (joomla) -->
@ -819,88 +779,6 @@
autocomplete="on" autocomplete="on"
showon="powers_repository:1" showon="powers_repository:1"
/> />
<!-- Add_custom_gitea_url Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_custom_gitea_url"
label="COM_COMPONENTBUILDER_CONFIG_ADD_CUSTOM_GITEA_URL_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_ADD_CUSTOM_GITEA_URL_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_GITVDMDEV</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_CUSTOMGITEA</option>
</field>
<!-- Note_custom_gitea_url Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_custom_gitea_url" label="COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_GITEA_URL_LABEL" description="COM_COMPONENTBUILDER_CONFIG_NOTE_CUSTOM_GITEA_URL_DESCRIPTION" heading="h3" class="alert alert-success note_custom_gitea_url" showon="add_custom_gitea_url:2" />
<!-- Custom_gitea_url Field. Type: Url. (joomla) -->
<field
type="url"
name="custom_gitea_url"
label="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_URL_LABEL"
size="70"
maxlength="150"
default="https://git.vdm.dev"
description="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_URL_DESCRIPTION"
class="text_area"
filter="url"
validated="url"
scheme="http,https"
message="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_URL_MESSAGE"
hint="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_URL_HINT"
autocomplete="on"
showon="add_custom_gitea_url:2"
/>
<!-- Custom_gitea_token Field. Type: Password. (joomla) -->
<field
type="password"
name="custom_gitea_token"
label="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_TOKEN_LABEL"
size="128"
description="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_TOKEN_DESCRIPTION"
message="Error! Please add token here."
class="text_area"
readonly="false"
disabled="false"
required="false"
filter="STRING"
hint="COM_COMPONENTBUILDER_CONFIG_CUSTOM_GITEA_TOKEN_HINT"
autocomplete="off"
showon="add_custom_gitea_url:2"
/>
<!-- Super_powers_core_organisation_note Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="super_powers_core_organisation_note" label="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_NOTE_LABEL" description="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_NOTE_DESCRIPTION" heading="h4" class="alert alert-success super_powers_core_organisation_note" showon="add_custom_gitea_url:2" />
<!-- Super_powers_core_organisation Field. Type: Text. (joomla) -->
<field
type="text"
name="super_powers_core_organisation"
label="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_LABEL"
size="70"
maxlength="150"
default="joomla"
description="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_DESCRIPTION"
class="text_area"
filter="WORD"
hint="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_ORGANISATION_HINT"
autocomplete="on"
showon="add_custom_gitea_url:2"
/>
<!-- Super_powers_core Field. Type: Text. (joomla) -->
<field
type="text"
name="super_powers_core"
label="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_LABEL"
size="70"
maxlength="150"
default="joomla/super-powers"
class="text_area"
filter="PATH"
hint="COM_COMPONENTBUILDER_CONFIG_SUPER_POWERS_CORE_HINT"
autocomplete="on"
showon="add_custom_gitea_url:2"
/>
</fieldset> </fieldset>
<fieldset <fieldset
name="compiler_custom_config" name="compiler_custom_config"
@ -913,6 +791,7 @@
label="COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_LABEL" label="COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_BUILDER_GIF_SIZE_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
default="480-272"> default="480-272">
@ -1038,6 +917,7 @@
label="COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_LABEL" label="COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_ASSETS_TABLE_FIX_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="2"> default="2">
<!-- Option Set. --> <!-- Option Set. -->
@ -1055,6 +935,7 @@
label="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_LABEL" label="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_COMPILER_FIELD_BUILDER_TYPE_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
filter="INT" filter="INT"
required="true" required="true"
default="2"> default="2">
@ -1262,6 +1143,7 @@
label="COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_LABEL" label="COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_DESCRIPTION" description="COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_SERVER_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
showon="cronjob_backup_type:2" showon="cronjob_backup_type:2"

View File

@ -120,6 +120,7 @@ class ComponentbuilderController extends BaseController
'language_translation' => 'language_translations', 'language_translation' => 'language_translations',
'language' => 'languages', 'language' => 'languages',
'server' => 'servers', 'server' => 'servers',
'repository' => 'repositories',
'help_document' => 'help_documents', 'help_document' => 'help_documents',
'admin_fields' => 'admins_fields', 'admin_fields' => 'admins_fields',
'admin_fields_conditions' => 'admins_fields_conditions', 'admin_fields_conditions' => 'admins_fields_conditions',

View File

@ -117,27 +117,40 @@ class ComponentbuilderControllerAdmin_views extends AdminController
/** /**
* Run the Expansion * Runs the expansion module.
* *
* @return void * This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to run the expansion module.
* 3. If the user is authorized, it attempts to run the expansion via an API call.
* 4. Depending on the result of the expansion operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful expansion, false on failure.
*/ */
public function runExpansion() public function runExpansion()
{ {
// Check for request forgeries // Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right // check if user has the right
$user = Factory::getUser(); $user = Factory::getUser();
// set page redirect // set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=admin_views', false); $redirect_url = Route::_('index.php?option=com_componentbuilder&view=admin_views', false);
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); $message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion // check if this user has the right to run expansion
if($user->authorise('admin_views.run_expansion', 'com_componentbuilder')) if($user->authorise('admin_views.run_expansion', 'com_componentbuilder'))
{ {
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); $message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API // run expansion via API
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand'); $result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned // is there a message returned
if (!is_numeric($result) && StringHelper::check($result)) if (!is_numeric($result) && StringHelper::check($result))
{ {
@ -151,6 +164,7 @@ class ComponentbuilderControllerAdmin_views extends AdminController
return true; return true;
} }
} }
$this->setRedirect($redirect_url, $message, 'error'); $this->setRedirect($redirect_url, $message, 'error');
return false; return false;
} }

View File

@ -522,27 +522,40 @@ class ComponentbuilderControllerCompiler extends AdminController
} }
/** /**
* Run the Expansion * Runs the expansion module.
* *
* @return void * This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to run the expansion module.
* 3. If the user is authorized, it attempts to run the expansion via an API call.
* 4. Depending on the result of the expansion operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful expansion, false on failure.
*/ */
public function runExpansion() public function runExpansion()
{ {
// Check for request forgeries // Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right // check if user has the right
$user = Factory::getUser(); $user = Factory::getUser();
// set page redirect // set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=compiler', false); $redirect_url = Route::_('index.php?option=com_componentbuilder&view=compiler', false);
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); $message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion // check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder')) if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
{ {
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); $message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API // run expansion via API
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand'); $result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned // is there a message returned
if (!is_numeric($result) && StringHelper::check($result)) if (!is_numeric($result) && StringHelper::check($result))
{ {
@ -556,6 +569,7 @@ class ComponentbuilderControllerCompiler extends AdminController
return true; return true;
} }
} }
$this->setRedirect($redirect_url, $message, 'error'); $this->setRedirect($redirect_url, $message, 'error');
return false; return false;
} }

View File

@ -117,27 +117,40 @@ class ComponentbuilderControllerCustom_codes extends AdminController
/** /**
* Run the Expansion * Runs the expansion module.
* *
* @return void * This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to run the expansion module.
* 3. If the user is authorized, it attempts to run the expansion via an API call.
* 4. Depending on the result of the expansion operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful expansion, false on failure.
*/ */
public function runExpansion() public function runExpansion()
{ {
// Check for request forgeries // Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right // check if user has the right
$user = Factory::getUser(); $user = Factory::getUser();
// set page redirect // set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_codes', false); $redirect_url = Route::_('index.php?option=com_componentbuilder&view=custom_codes', false);
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); $message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion // check if this user has the right to run expansion
if($user->authorise('custom_codes.run_expansion', 'com_componentbuilder')) if($user->authorise('custom_codes.run_expansion', 'com_componentbuilder'))
{ {
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); $message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API // run expansion via API
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand'); $result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned // is there a message returned
if (!is_numeric($result) && StringHelper::check($result)) if (!is_numeric($result) && StringHelper::check($result))
{ {
@ -151,6 +164,7 @@ class ComponentbuilderControllerCustom_codes extends AdminController
return true; return true;
} }
} }
$this->setRedirect($redirect_url, $message, 'error'); $this->setRedirect($redirect_url, $message, 'error');
return false; return false;
} }

View File

@ -117,27 +117,40 @@ class ComponentbuilderControllerDynamic_gets extends AdminController
/** /**
* Run the Expansion * Runs the expansion module.
* *
* @return void * This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to run the expansion module.
* 3. If the user is authorized, it attempts to run the expansion via an API call.
* 4. Depending on the result of the expansion operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful expansion, false on failure.
*/ */
public function runExpansion() public function runExpansion()
{ {
// Check for request forgeries // Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right // check if user has the right
$user = Factory::getUser(); $user = Factory::getUser();
// set page redirect // set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false); $redirect_url = Route::_('index.php?option=com_componentbuilder&view=dynamic_gets', false);
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); $message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion // check if this user has the right to run expansion
if($user->authorise('dynamic_gets.run_expansion', 'com_componentbuilder')) if($user->authorise('dynamic_gets.run_expansion', 'com_componentbuilder'))
{ {
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); $message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API // run expansion via API
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand'); $result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned // is there a message returned
if (!is_numeric($result) && StringHelper::check($result)) if (!is_numeric($result) && StringHelper::check($result))
{ {
@ -151,6 +164,7 @@ class ComponentbuilderControllerDynamic_gets extends AdminController
return true; return true;
} }
} }
$this->setRedirect($redirect_url, $message, 'error'); $this->setRedirect($redirect_url, $message, 'error');
return false; return false;
} }

View File

@ -117,27 +117,40 @@ class ComponentbuilderControllerFields extends AdminController
/** /**
* Run the Expansion * Runs the expansion module.
* *
* @return void * This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to run the expansion module.
* 3. If the user is authorized, it attempts to run the expansion via an API call.
* 4. Depending on the result of the expansion operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful expansion, false on failure.
*/ */
public function runExpansion() public function runExpansion()
{ {
// Check for request forgeries // Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right // check if user has the right
$user = Factory::getUser(); $user = Factory::getUser();
// set page redirect // set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=fields', false); $redirect_url = Route::_('index.php?option=com_componentbuilder&view=fields', false);
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); $message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion // check if this user has the right to run expansion
if($user->authorise('fields.run_expansion', 'com_componentbuilder')) if($user->authorise('fields.run_expansion', 'com_componentbuilder'))
{ {
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); $message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API // run expansion via API
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand'); $result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned // is there a message returned
if (!is_numeric($result) && StringHelper::check($result)) if (!is_numeric($result) && StringHelper::check($result))
{ {
@ -151,6 +164,7 @@ class ComponentbuilderControllerFields extends AdminController
return true; return true;
} }
} }
$this->setRedirect($redirect_url, $message, 'error'); $this->setRedirect($redirect_url, $message, 'error');
return false; return false;
} }

View File

@ -118,27 +118,40 @@ class ComponentbuilderControllerJoomla_components extends AdminController
/** /**
* Run the Expansion * Runs the expansion module.
* *
* @return void * This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to run the expansion module.
* 3. If the user is authorized, it attempts to run the expansion via an API call.
* 4. Depending on the result of the expansion operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful expansion, false on failure.
*/ */
public function runExpansion() public function runExpansion()
{ {
// Check for request forgeries // Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right // check if user has the right
$user = Factory::getUser(); $user = Factory::getUser();
// set page redirect // set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_components', false); $redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_components', false);
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); $message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion // check if this user has the right to run expansion
if($user->authorise('joomla_components.run_expansion', 'com_componentbuilder')) if($user->authorise('joomla_components.run_expansion', 'com_componentbuilder'))
{ {
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); $message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API // run expansion via API
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand'); $result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned // is there a message returned
if (!is_numeric($result) && StringHelper::check($result)) if (!is_numeric($result) && StringHelper::check($result))
{ {
@ -152,6 +165,7 @@ class ComponentbuilderControllerJoomla_components extends AdminController
return true; return true;
} }
} }
$this->setRedirect($redirect_url, $message, 'error'); $this->setRedirect($redirect_url, $message, 'error');
return false; return false;
} }

View File

@ -52,27 +52,40 @@ class ComponentbuilderControllerJoomla_plugins extends AdminController
/** /**
* Run the Expansion * Runs the expansion module.
* *
* @return void * This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to run the expansion module.
* 3. If the user is authorized, it attempts to run the expansion via an API call.
* 4. Depending on the result of the expansion operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful expansion, false on failure.
*/ */
public function runExpansion() public function runExpansion()
{ {
// Check for request forgeries // Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right // check if user has the right
$user = Factory::getUser(); $user = Factory::getUser();
// set page redirect // set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false); $redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_plugins', false);
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); $message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion // check if this user has the right to run expansion
if($user->authorise('joomla_plugins.run_expansion', 'com_componentbuilder')) if($user->authorise('joomla_plugins.run_expansion', 'com_componentbuilder'))
{ {
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); $message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API // run expansion via API
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand'); $result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned // is there a message returned
if (!is_numeric($result) && StringHelper::check($result)) if (!is_numeric($result) && StringHelper::check($result))
{ {
@ -86,6 +99,7 @@ class ComponentbuilderControllerJoomla_plugins extends AdminController
return true; return true;
} }
} }
$this->setRedirect($redirect_url, $message, 'error'); $this->setRedirect($redirect_url, $message, 'error');
return false; return false;
} }

View File

@ -49,6 +49,20 @@ class ComponentbuilderControllerJoomla_power extends FormController
parent::__construct($config); parent::__construct($config);
} }
/**
* Resets the specified Joomla power.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to reset the Joomla power.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified power.
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
*/
public function resetPowers() public function resetPowers()
{ {
// Check for request forgeries // Check for request forgeries
@ -79,7 +93,8 @@ class ComponentbuilderControllerJoomla_power extends FormController
} }
elseif($user->authorise('power.reset', 'com_componentbuilder')) elseif($user->authorise('power.reset', 'com_componentbuilder'))
{ {
if (JoomlaPowerFactory::_('Joomlapower')->reset([$guid])) try {
if (JoomlaPowerFactory::_('Joomla.Power.Remote.Get')->reset([$guid]))
{ {
// set success message // set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>'; $message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
@ -92,6 +107,85 @@ class ComponentbuilderControllerJoomla_power extends FormController
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>'; $message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_POWER_HAS_FAILED') . '</p>'; $message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THIS_JOOMLA_POWER_HAS_FAILED') . '</p>';
} }
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
}
// set redirect
$redirect_url = Route::_(
'index.php?option=com_componentbuilder&view=joomla_power'
. $this->getRedirectToItemAppend($id), $success
);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
/**
* Pushes the specified Joomla power.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to push the Joomla power.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to push the specified power.
* 6. Depending on the result of the push operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get Item posted
$item = $this->input->post->get('jform', array(), 'array');
// check if user has the right
$user = Factory::getUser();
// set default error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PERMISSION_DENIED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_PUSH_THIS_JOOMLA_POWER') . '</p>';
$status = 'error';
$success = false;
// load the ID
$id = $item['id'] ?? null;
$guid = $item['guid'] ?? null;
// check if there is any selections
if ($id === null || $guid === null)
{
// set error message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_NOT_SAVED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_YOU_MUST_FIRST_SAVE_THE_JOOMLA_POWER_BEFORE_YOU_CAN_USE_THIS_FEATURE') . '</p>';
}
elseif($user->authorise('power.push', 'com_componentbuilder'))
{
try {
if (JoomlaPowerFactory::_('Joomla.Power.Remote.Set')->items([$guid]))
{
// set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THE_JOOMLA_POWER_HAS_SUCCESSFULLY_BEEN_PUSHED').'</p>';
$status = 'success';
$success = true;
}
else
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THIS_JOOMLA_POWER_HAS_FAILED') . '</p>';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
} }
// set redirect // set redirect

View File

@ -50,6 +50,18 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
return parent::getModel($name, $prefix, $config); return parent::getModel($name, $prefix, $config);
} }
/**
* Initializes all remote Joomla powers and syncs them with the local database.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to initialize the Joomla powers.
* 3. If the user is authorized, it attempts to initialize the remote Joomla powers.
* 4. Depending on the result of the initialization operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful initialization, false on failure.
*/
public function initPowers() public function initPowers()
{ {
// Check for request forgeries // Check for request forgeries
@ -66,7 +78,8 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
if($user->authorise('power.init', 'com_componentbuilder')) if($user->authorise('power.init', 'com_componentbuilder'))
{ {
if (JoomlaPowerFactory::_('Joomlapower')->init()) try {
if (JoomlaPowerFactory::_('Joomla.Power.Remote.Get')->init())
{ {
// set success message // set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_JOOMLA_POWERS') . '</h1>'; $message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_JOOMLA_POWERS') . '</h1>';
@ -80,6 +93,10 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>'; $message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_POWERS_HAS_FAILED') . '</p>'; $message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_INITIALIZATION_OF_THIS_JOOMLA_POWERS_HAS_FAILED') . '</p>';
} }
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_INITIALIZATION_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
} }
// set redirect // set redirect
@ -89,6 +106,21 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
return $success; return $success;
} }
/**
* Resets the selected Joomla powers.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to reset the selected Joomla powers.
* 6. If the user is authorized and powers are selected, it attempts to reset the selected Joomla powers.
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
*/
public function resetPowers() public function resetPowers()
{ {
// Check for request forgeries // Check for request forgeries
@ -121,7 +153,8 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
{ {
$guids = GetHelper::vars('joomla_power', $pks, 'id', 'guid'); $guids = GetHelper::vars('joomla_power', $pks, 'id', 'guid');
if (JoomlaPowerFactory::_('Joomlapower')->reset($guids)) try {
if (JoomlaPowerFactory::_('Joomla.Power.Remote.Get')->reset($guids))
{ {
// set success message // set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>'; $message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
@ -134,6 +167,89 @@ class ComponentbuilderControllerJoomla_powers extends AdminController
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>'; $message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_POWERS_HAS_FAILED') . '</p>'; $message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_RESET_OF_THESE_JOOMLA_POWERS_HAS_FAILED') . '</p>';
} }
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_RESET_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_powers', $success);
$this->setRedirect($redirect_url, $message, $status);
return $success;
}
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_powers', false);
$this->setRedirect($redirect_url);
return $success;
}
/**
* Pushes the selected Joomla powers.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to push the selected Joomla powers.
* 6. If the user is authorized and powers are selected, it attempts to push the selected Joomla powers.
* 7. Depending on the result of the push operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful push, false on failure.
*/
public function pushPowers()
{
// Check for request forgeries
Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// get IDS of the selected powers
$pks = $this->input->post->get('cid', [], 'array');
// Sanitize the input
ArrayHelper::toInteger($pks);
// check if there is any selections
if ($pks === [])
{
// set error message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_NO_SELECTION_DETECTED').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_PLEASE_FIRST_MAKE_A_SELECTION_FROM_THE_LIST').'</p>';
// set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_powers', false);
$this->setRedirect($redirect_url, $message, 'error');
return false;
}
$status = 'error';
$success = false;
// check if user has the right
$user = Factory::getUser();
if($user->authorise('power.push', 'com_componentbuilder'))
{
$guids = GetHelper::vars('joomla_power', $pks, 'id', 'guid');
try {
if (JoomlaPowerFactory::_('Joomla.Power.Remote.Set')->items($guids))
{
// set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';
$message .= '<p>'.Text::_('COM_COMPONENTBUILDER_THESE_JOOMLA_POWERS_HAVE_SUCCESSFULLY_BEEN_PUSHED').'</p>';
$status = 'success';
$success = true;
}
else
{
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . Text::_('COM_COMPONENTBUILDER_THE_PUSH_OF_THESE_JOOMLA_POWERS_HAS_FAILED') . '</p>';
}
} catch (\Exception $e) {
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_PUSH_FAILED') . '</h1>';
$message .= '<p>' . \htmlspecialchars($e->getMessage()) . '</p>';
}
// set redirect // set redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_powers', $success); $redirect_url = Route::_('index.php?option=com_componentbuilder&view=joomla_powers', $success);

View File

@ -49,6 +49,20 @@ class ComponentbuilderControllerPower extends FormController
parent::__construct($config); parent::__construct($config);
} }
/**
* Resets the specified power.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the item data posted by the user.
* 3. It checks whether the current user has the necessary permissions to reset the power.
* 4. It validates the presence of the necessary item identifiers (ID and GUID).
* 5. If the user is authorized and the identifiers are valid, it attempts to reset the specified power.
* 6. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 7. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
*/
public function resetPowers() public function resetPowers()
{ {
// Check for request forgeries // Check for request forgeries
@ -79,7 +93,7 @@ class ComponentbuilderControllerPower extends FormController
} }
elseif($user->authorise('power.reset', 'com_componentbuilder')) elseif($user->authorise('power.reset', 'com_componentbuilder'))
{ {
if (PowerFactory::_('Superpower')->reset([$guid])) if (PowerFactory::_('Power.Remote.Get')->reset([$guid]))
{ {
// set success message // set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>'; $message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';

View File

@ -54,27 +54,40 @@ class ComponentbuilderControllerPowers extends AdminController
/** /**
* Run the Expansion * Runs the expansion module.
* *
* @return void * This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to run the expansion module.
* 3. If the user is authorized, it attempts to run the expansion via an API call.
* 4. Depending on the result of the expansion operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful expansion, false on failure.
*/ */
public function runExpansion() public function runExpansion()
{ {
// Check for request forgeries // Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right // check if user has the right
$user = Factory::getUser(); $user = Factory::getUser();
// set page redirect // set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=powers', false); $redirect_url = Route::_('index.php?option=com_componentbuilder&view=powers', false);
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); $message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion // check if this user has the right to run expansion
if($user->authorise('powers.run_expansion', 'com_componentbuilder')) if($user->authorise('powers.run_expansion', 'com_componentbuilder'))
{ {
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); $message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API // run expansion via API
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand'); $result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned // is there a message returned
if (!is_numeric($result) && StringHelper::check($result)) if (!is_numeric($result) && StringHelper::check($result))
{ {
@ -88,10 +101,23 @@ class ComponentbuilderControllerPowers extends AdminController
return true; return true;
} }
} }
$this->setRedirect($redirect_url, $message, 'error'); $this->setRedirect($redirect_url, $message, 'error');
return false; return false;
} }
/**
* Initializes all remote powers and syncs them with the local database.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to initialize the powers.
* 3. If the user is authorized, it attempts to initialize the remote powers.
* 4. Depending on the result of the initialization operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful initialization, false on failure.
*/
public function initPowers() public function initPowers()
{ {
// Check for request forgeries // Check for request forgeries
@ -108,7 +134,7 @@ class ComponentbuilderControllerPowers extends AdminController
if($user->authorise('power.init', 'com_componentbuilder')) if($user->authorise('power.init', 'com_componentbuilder'))
{ {
if (PowerFactory::_('Superpower')->init()) if (PowerFactory::_('Power.Remote.Get')->init())
{ {
// set success message // set success message
$message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_POWERS') . '</h1>'; $message = '<h1>' . Text::_('COM_COMPONENTBUILDER_SUCCESSFULLY_INITIALIZED_ALL_REMOTE_POWERS') . '</h1>';
@ -131,6 +157,21 @@ class ComponentbuilderControllerPowers extends AdminController
return $success; return $success;
} }
/**
* Resets the selected powers.
*
* This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It retrieves the IDs of the selected powers from the user input.
* 3. It sanitizes the input by converting the IDs to integers.
* 4. It checks whether any powers have been selected.
* 5. It checks whether the current user has the necessary permissions to reset the selected powers.
* 6. If the user is authorized and powers are selected, it attempts to reset the selected powers.
* 7. Depending on the result of the reset operation, it sets the appropriate success or error message.
* 8. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful reset, false on failure.
*/
public function resetPowers() public function resetPowers()
{ {
// Check for request forgeries // Check for request forgeries
@ -163,7 +204,7 @@ class ComponentbuilderControllerPowers extends AdminController
{ {
$guids = GetHelper::vars('power', $pks, 'id', 'guid'); $guids = GetHelper::vars('power', $pks, 'id', 'guid');
if (PowerFactory::_('Superpower')->reset($guids)) if (PowerFactory::_('Power.Remote.Get')->reset($guids))
{ {
// set success message // set success message
$message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>'; $message = '<h1>'.Text::_('COM_COMPONENTBUILDER_SUCCESS').'</h1>';

View File

@ -0,0 +1,50 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
/**
* Repositories Admin Controller
*/
class ComponentbuilderControllerRepositories extends AdminController
{
/**
* The prefix to use with controller messages.
*
* @var string
* @since 1.6
*/
protected $text_prefix = 'COM_COMPONENTBUILDER_REPOSITORIES';
/**
* Method to get a model object, loading it if required.
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param array $config Configuration array for model. Optional.
*
* @return JModelLegacy The model.
*
* @since 1.6
*/
public function getModel($name = 'Repository', $prefix = 'ComponentbuilderModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
}
}

View File

@ -0,0 +1,329 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
/**
* Repository Form Controller
*/
class ComponentbuilderControllerRepository extends FormController
{
/**
* Current or most recently performed task.
*
* @var string
* @since 12.2
* @note Replaces _task.
*/
protected $task;
/**
* Class constructor.
*
* @param array $config A named array of configuration variables.
*
* @since 1.6
*/
public function __construct($config = [])
{
$this->view_list = 'Repositories'; // safeguard for setting the return view listing to the main view.
parent::__construct($config);
}
/**
* Method override to check if you can add a new record.
*
* @param array $data An array of input data.
*
* @return boolean
*
* @since 1.6
*/
protected function allowAdd($data = [])
{
// Get user object.
$user = Factory::getUser();
// Access check.
$access = $user->authorise('repository.access', 'com_componentbuilder');
if (!$access)
{
return false;
}
// In the absence of better information, revert to the component permissions.
return $user->authorise('repository.create', $this->option);
}
/**
* Method override to check if you can edit an existing record.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key.
*
* @return boolean
*
* @since 1.6
*/
protected function allowEdit($data = [], $key = 'id')
{
// get user object.
$user = Factory::getUser();
// get record id.
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
// Access check.
$access = ($user->authorise('repository.access', 'com_componentbuilder.repository.' . (int) $recordId) && $user->authorise('repository.access', 'com_componentbuilder'));
if (!$access)
{
return false;
}
if ($recordId)
{
// The record has been set. Check the record permissions.
$permission = $user->authorise('repository.edit', 'com_componentbuilder.repository.' . (int) $recordId);
if (!$permission)
{
if ($user->authorise('repository.edit.own', 'com_componentbuilder.repository.' . $recordId))
{
// Now test the owner is the user.
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
if (empty($ownerId))
{
// Need to do a lookup from the model.
$record = $this->getModel()->getItem($recordId);
if (empty($record))
{
return false;
}
$ownerId = $record->created_by;
}
// If the owner matches 'me' then allow.
if ($ownerId == $user->id)
{
if ($user->authorise('repository.edit.own', 'com_componentbuilder'))
{
return true;
}
}
}
return false;
}
}
// Since there is no permission, revert to the component permissions.
return $user->authorise('repository.edit', $this->option);
}
/**
* Gets the URL arguments to append to an item redirect.
*
* @param integer $recordId The primary key id for the item.
* @param string $urlVar The name of the URL variable for the id.
*
* @return string The arguments to append to the redirect URL.
*
* @since 1.6
*/
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
{
// get the referral options (old method use return instead see parent)
$ref = $this->input->get('ref', 0, 'string');
$refid = $this->input->get('refid', 0, 'int');
// get redirect info.
$append = parent::getRedirectToItemAppend($recordId, $urlVar);
// set the referral options
if ($refid && $ref)
{
$append = '&ref=' . (string) $ref . '&refid='. (int) $refid . $append;
}
elseif ($ref)
{
$append = '&ref='. (string) $ref . $append;
}
return $append;
}
/**
* Method to run batch operations.
*
* @param object $model The model.
*
* @return boolean True if successful, false otherwise and internal error is set.
*
* @since 2.5
*/
public function batch($model = null)
{
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('Repository', '', []);
// Preset the redirect
$this->setRedirect(Route::_('index.php?option=com_componentbuilder&view=repositories' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
/**
* Method to cancel an edit.
*
* @param string $key The name of the primary key of the URL variable.
*
* @return boolean True if access level checks pass, false otherwise.
*
* @since 12.2
*/
public function cancel($key = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$cancel = parent::cancel($key);
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string)$this->ref . '&layout=edit&id=' . (int)$this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view='.(string)$this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $cancel;
}
/**
* Method to save a record.
*
* @param string $key The name of the primary key of the URL variable.
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
*
* @return boolean True if successful, false otherwise.
*
* @since 12.2
*/
public function save($key = null, $urlVar = null)
{
// get the referral options
$this->ref = $this->input->get('ref', 0, 'word');
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
// to make sure the item is checkedin on redirect
$this->task = 'save';
}
$saved = parent::save($key, $urlVar);
// This is not needed since parent save already does this
// Due to the ref and refid implementation we need to add this
if ($canReturn)
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
$redirect, false
)
);
}
elseif ($this->refid && $this->ref)
{
$redirect = '&view=' . (string) $this->ref . '&layout=edit&id=' . (int) $this->refid;
// Redirect to the item screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
elseif ($this->ref)
{
$redirect = '&view=' . (string) $this->ref;
// Redirect to the list screen.
$this->setRedirect(
Route::_(
'index.php?option=' . $this->option . $redirect, false
)
);
}
return $saved;
}
/**
* Function that allows child controller access to model data
* after the data has been saved.
*
* @param BaseDatabaseModel &$model The data model object.
* @param array $validData The validated data.
*
* @return void
*
* @since 11.1
*/
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
{
return;
}
}

View File

@ -117,27 +117,40 @@ class ComponentbuilderControllerValidation_rules extends AdminController
/** /**
* Run the Expansion * Runs the expansion module.
* *
* @return void * This function performs several checks and operations:
* 1. It verifies the authenticity of the request to prevent request forgery.
* 2. It checks whether the current user has the necessary permissions to run the expansion module.
* 3. If the user is authorized, it attempts to run the expansion via an API call.
* 4. Depending on the result of the expansion operation, it sets the appropriate success or error message.
* 5. It redirects the user to a specified URL with the result message and status.
*
* @return bool True on successful expansion, false on failure.
*/ */
public function runExpansion() public function runExpansion()
{ {
// Check for request forgeries // Check for request forgeries
Session::checkToken() or \jexit(Text::_('JINVALID_TOKEN')); Session::checkToken() or die(Text::_('JINVALID_TOKEN'));
// check if user has the right // check if user has the right
$user = Factory::getUser(); $user = Factory::getUser();
// set page redirect // set page redirect
$redirect_url = Route::_('index.php?option=com_componentbuilder&view=validation_rules', false); $redirect_url = Route::_('index.php?option=com_componentbuilder&view=validation_rules', false);
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE'); $message = Text::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion // check if this user has the right to run expansion
if($user->authorise('validation_rules.run_expansion', 'com_componentbuilder')) if($user->authorise('validation_rules.run_expansion', 'com_componentbuilder'))
{ {
// set massage // set massage
$message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB'); $message = Text::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
// run expansion via API // run expansion via API
$result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand'); $result = ComponentbuilderHelper::getFileContents(Uri::root() . 'index.php?option=com_componentbuilder&task=api.expand');
// is there a message returned // is there a message returned
if (!is_numeric($result) && StringHelper::check($result)) if (!is_numeric($result) && StringHelper::check($result))
{ {
@ -151,6 +164,7 @@ class ComponentbuilderControllerValidation_rules extends AdminController
return true; return true;
} }
} }
$this->setRedirect($redirect_url, $message, 'error'); $this->setRedirect($redirect_url, $message, 'error');
return false; return false;
} }

View File

@ -6173,6 +6173,10 @@ abstract class ComponentbuilderHelper
{ {
\JHtmlSidebar::addEntry(Text::_('COM_COMPONENTBUILDER_SUBMENU_SERVERS'), 'index.php?option=com_componentbuilder&view=servers', $submenu === 'servers'); \JHtmlSidebar::addEntry(Text::_('COM_COMPONENTBUILDER_SUBMENU_SERVERS'), 'index.php?option=com_componentbuilder&view=servers', $submenu === 'servers');
} }
if ($user->authorise('repository.access', 'com_componentbuilder') && $user->authorise('repository.submenu', 'com_componentbuilder'))
{
\JHtmlSidebar::addEntry(Text::_('COM_COMPONENTBUILDER_SUBMENU_REPOSITORIES'), 'index.php?option=com_componentbuilder&view=repositories', $submenu === 'repositories');
}
if ($user->authorise('help_document.access', 'com_componentbuilder') && $user->authorise('help_document.submenu', 'com_componentbuilder')) if ($user->authorise('help_document.access', 'com_componentbuilder') && $user->authorise('help_document.submenu', 'com_componentbuilder'))
{ {
\JHtmlSidebar::addEntry(Text::_('COM_COMPONENTBUILDER_SUBMENU_HELP_DOCUMENTS'), 'index.php?option=com_componentbuilder&view=help_documents', $submenu === 'help_documents'); \JHtmlSidebar::addEntry(Text::_('COM_COMPONENTBUILDER_SUBMENU_HELP_DOCUMENTS'), 'index.php?option=com_componentbuilder&view=help_documents', $submenu === 'help_documents');

File diff suppressed because one or more lines are too long

View File

@ -850,6 +850,8 @@ COM_COMPONENTBUILDER_JOOMLA_POWERS_SUBMENU="Joomla Powers Submenu"
COM_COMPONENTBUILDER_JOOMLA_POWERS_SUBMENU_DESC="Allows the users in this group to submenu of joomla power" COM_COMPONENTBUILDER_JOOMLA_POWERS_SUBMENU_DESC="Allows the users in this group to submenu of joomla power"
COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS="Joomla Power Init Button Access" COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS="Joomla Power Init Button Access"
COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button." COM_COMPONENTBUILDER_JOOMLA_POWER_INIT_BUTTON_ACCESS_DESC="Allows the users in this group to access the init button."
COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS="Joomla Power Push Button Access"
COM_COMPONENTBUILDER_JOOMLA_POWER_PUSH_BUTTON_ACCESS_DESC="Allows the users in this group to access the push button."
COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS="Joomla Power Reset Button Access" COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS="Joomla Power Reset Button Access"
COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button." COM_COMPONENTBUILDER_JOOMLA_POWER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_LANGUAGES_ACCESS="Languages Access" COM_COMPONENTBUILDER_LANGUAGES_ACCESS="Languages Access"
@ -1065,6 +1067,30 @@ COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS="Power Reset Button Access"
COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button." COM_COMPONENTBUILDER_POWER_RESET_BUTTON_ACCESS_DESC="Allows the users in this group to access the reset button."
COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS="Power Run Expansion Button Access" COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS="Power Run Expansion Button Access"
COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button." COM_COMPONENTBUILDER_POWER_RUN_EXPANSION_BUTTON_ACCESS_DESC="Allows the users in this group to access the run expansion button."
COM_COMPONENTBUILDER_REPOSITORIES_ACCESS="Repositories Access"
COM_COMPONENTBUILDER_REPOSITORIES_ACCESS_DESC="Allows the users in this group to access access repositories"
COM_COMPONENTBUILDER_REPOSITORIES_BATCH_USE="Repositories Batch Use"
COM_COMPONENTBUILDER_REPOSITORIES_BATCH_USE_DESC="Allows the users in this group to use batch copy/update method of batch repositories"
COM_COMPONENTBUILDER_REPOSITORIES_CREATE="Repositories Create"
COM_COMPONENTBUILDER_REPOSITORIES_CREATE_DESC="Allows the users in this group to create create repositories"
COM_COMPONENTBUILDER_REPOSITORIES_DASHBOARD_LIST="Repositories Dashboard List"
COM_COMPONENTBUILDER_REPOSITORIES_DASHBOARD_LIST_DESC="Allows the users in this group to dashboard list of repository"
COM_COMPONENTBUILDER_REPOSITORIES_DELETE="Repositories Delete"
COM_COMPONENTBUILDER_REPOSITORIES_DELETE_DESC="Allows the users in this group to delete delete repositories"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT="Repositories Edit"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY="Repositories Edit Created By"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by repositories"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE="Repositories Edit Created Date"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_CREATED_DATE_DESC="Allows the users in this group to update the created date of the edit created repositories"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_DESC="Allows the users in this group to edit the repository"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN="Repositories Edit Own"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_OWN_DESC="Allows the users in this group to edit edit own repositories created by them"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE="Repositories Edit State"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_STATE_DESC="Allows the users in this group to update the state of the repository"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION="Repositories Edit Version"
COM_COMPONENTBUILDER_REPOSITORIES_EDIT_VERSION_DESC="Allows the users in this group to edit versions of version repositories"
COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU="Repositories Submenu"
COM_COMPONENTBUILDER_REPOSITORIES_SUBMENU_DESC="Allows the users in this group to submenu of repository"
COM_COMPONENTBUILDER_SEARCH_ACCESS="Search Access" COM_COMPONENTBUILDER_SEARCH_ACCESS="Search Access"
COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC="Allows the users in this group to access search." COM_COMPONENTBUILDER_SEARCH_ACCESS_DESC="Allows the users in this group to access search."
COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS="Search Compiler Button Access" COM_COMPONENTBUILDER_SEARCH_COMPILER_BUTTON_ACCESS="Search Compiler Button Access"

View File

@ -31,7 +31,6 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'store', 'store',
'medium_encryption_note', 'medium_encryption_note',
'basic_encryption_note', 'basic_encryption_note',
'note_whmcs_encryption',
'note_expert_field_save_mode', 'note_expert_field_save_mode',
'initiator_on_save_model', 'initiator_on_save_model',
'initiator_on_get_model', 'initiator_on_get_model',

View File

@ -19,7 +19,7 @@ use VDM\Joomla\Utilities\StringHelper;
use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\ArrayHelper;
// set the defaults // set the defaults
$items = $displayData->vxtfields; $items = $displayData->vxsfields;
$user = Factory::getUser(); $user = Factory::getUser();
$id = $displayData->item->id; $id = $displayData->item->id;
// set the edit URL // set the edit URL

View File

@ -30,12 +30,6 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'author', 'author',
'email', 'email',
'website', 'website',
'add_license',
'license_type',
'note_whmcs_lisencing_note',
'whmcs_key',
'whmcs_url',
'whmcs_buy_link',
'license', 'license',
'bom', 'bom',
'image', 'image',

View File

@ -26,8 +26,8 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields // get the fields
$fields = $displayData->get($fields_tab_layout) ?: array( $fields = $displayData->get($fields_tab_layout) ?: array(
'description', 'settings',
'settings' 'description'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: []; $hiddenFields = $displayData->get('hidden_fields') ?: [];

View File

@ -30,6 +30,8 @@ $fields = $displayData->get($fields_tab_layout) ?: array(
'description', 'description',
'extends', 'extends',
'extends_custom', 'extends_custom',
'extendsinterfaces',
'extendsinterfaces_custom',
'implements', 'implements',
'implements_custom', 'implements_custom',
'namespace', 'namespace',

View File

@ -0,0 +1,46 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'system_name',
'target',
'access_repo'
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -0,0 +1,45 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'type',
'base',
'username',
'token'
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -0,0 +1,45 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'organisation',
'repository',
'read_branch',
'write_branch'
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -0,0 +1,47 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'guid',
'title',
'created',
'created_by',
'modified',
'modified_by'
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -0,0 +1,47 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
// get the layout fields override method name (from layout path/ID)
$layout_path_array = explode('.', $this->getLayoutId());
// Since we cannot pass the layout and tab names as parameters to the model method
// this name combination of tab and layout in the method name is the only work around
// seeing that JCB uses those two values (tab_name & layout_name) as the layout file name.
// example of layout name: details_left.php
// example of method name: getFields_details_left()
$fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'published',
'ordering',
'access',
'version',
'hits',
'id'
);
$hiddenFields = $displayData->get('hidden_fields') ?: [];
?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -86,10 +86,18 @@ class ComponentbuilderModelAdmin_fields_relations extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -235,10 +235,18 @@ class ComponentbuilderModelAdmin_view extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -1259,7 +1259,7 @@ class ComponentbuilderModelAjax extends ListModel
array('table' => 'custom_admin_view', 'tables' => 'custom_admin_views', 'fields' => array('params' => 'custom_admin_view_headers:power_:power', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW'), array('table' => 'custom_admin_view', 'tables' => 'custom_admin_views', 'fields' => array('params' => 'custom_admin_view_headers:power_:power', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW'),
array('table' => 'joomla_component', 'tables' => 'joomla_components', 'fields' => array('params' => 'joomla_component_headers:power_:power', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT'), array('table' => 'joomla_component', 'tables' => 'joomla_components', 'fields' => array('params' => 'joomla_component_headers:power_:power', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_JOOMLA_COMPONENT'),
array('table' => 'component_dashboard', 'tables' => 'components_dashboard', 'fields' => array('params' => 'component_dashboard_headers:power_:power', 'joomla_component' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD', 'linked_name' => 'system_name'), array('table' => 'component_dashboard', 'tables' => 'components_dashboard', 'fields' => array('params' => 'component_dashboard_headers:power_:power', 'joomla_component' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_COMPONENT_DASHBOARD', 'linked_name' => 'system_name'),
array('table' => 'power', 'tables' => 'powers', 'fields' => array('extends' => 'GUID', 'implements' => 'ARRAY', 'use_selection' => 'use', 'load_selection' => 'load', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_POWER') array('table' => 'power', 'tables' => 'powers', 'fields' => array('extends' => 'GUID', 'extendsinterfaces' => 'ARRAY', 'implements' => 'ARRAY', 'use_selection' => 'use', 'load_selection' => 'load', 'system_name' => 'NAME'), 'linked' => 'COM_COMPONENTBUILDER_POWER')
) )
); );

View File

@ -90,10 +90,18 @@ class ComponentbuilderModelClass_extends extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -94,10 +94,18 @@ class ComponentbuilderModelClass_method extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -91,10 +91,18 @@ class ComponentbuilderModelClass_property extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -94,10 +94,18 @@ class ComponentbuilderModelComponent_dashboard extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -95,10 +95,18 @@ class ComponentbuilderModelComponent_router extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -37,7 +37,7 @@ class ComponentbuilderModelComponentbuilder extends ListModel
$icons = []; $icons = [];
// view groups array // view groups array
$viewGroups = array( $viewGroups = array(
'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png.powers', 'png.search', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_views', 'png.custom_admin_views', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_field', 'png.fieldtypes', 'png.fieldtypes.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_fieldtype', 'png.language_translations', 'png.servers', 'png.help_documents') 'main' => array('png.compiler', 'png.joomla_components', 'png.joomla_modules', 'png.joomla_plugins', 'png.powers', 'png.search', 'png||importjcbpackages||index.php?option=com_componentbuilder&view=joomla_components&task=joomla_components.smartImport', 'png.admin_views', 'png.custom_admin_views', 'png.site_views', 'png.template.add', 'png.templates', 'png.layouts', 'png.dynamic_get.add', 'png.dynamic_gets', 'png.custom_codes', 'png.placeholders', 'png.libraries', 'png.snippets', 'png.get_snippets', 'png.validation_rules', 'png.field.add', 'png.fields', 'png.fields.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_field', 'png.fieldtypes', 'png.fieldtypes.catid_qpo0O0oqp_com_componentbuilder_po0O0oq_fieldtype', 'png.language_translations', 'png.servers', 'png.repositories', 'png.help_documents')
); );
// view access array // view access array
$viewAccess = [ $viewAccess = [
@ -155,6 +155,11 @@ class ComponentbuilderModelComponentbuilder extends ListModel
'server.access' => 'server.access', 'server.access' => 'server.access',
'servers.submenu' => 'server.submenu', 'servers.submenu' => 'server.submenu',
'servers.dashboard_list' => 'server.dashboard_list', 'servers.dashboard_list' => 'server.dashboard_list',
'repository.create' => 'repository.create',
'repositories.access' => 'repository.access',
'repository.access' => 'repository.access',
'repositories.submenu' => 'repository.submenu',
'repositories.dashboard_list' => 'repository.dashboard_list',
'help_document.create' => 'help_document.create', 'help_document.create' => 'help_document.create',
'help_documents.access' => 'help_document.access', 'help_documents.access' => 'help_document.access',
'help_document.access' => 'help_document.access', 'help_document.access' => 'help_document.access',

View File

@ -152,10 +152,18 @@ class ComponentbuilderModelCustom_admin_view extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -106,10 +106,18 @@ class ComponentbuilderModelCustom_code extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -146,10 +146,18 @@ class ComponentbuilderModelDynamic_get extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {

View File

@ -71,7 +71,6 @@ class ComponentbuilderModelField extends AdminModel
'store', 'store',
'medium_encryption_note', 'medium_encryption_note',
'basic_encryption_note', 'basic_encryption_note',
'note_whmcs_encryption',
'note_expert_field_save_mode', 'note_expert_field_save_mode',
'initiator_on_save_model', 'initiator_on_save_model',
'initiator_on_get_model', 'initiator_on_get_model',
@ -140,10 +139,18 @@ class ComponentbuilderModelField extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {
@ -215,6 +222,12 @@ class ComponentbuilderModelField extends AdminModel
$item->metadata = $registry->toArray(); $item->metadata = $registry->toArray();
} }
if (!empty($item->on_get_model_field))
{
// base64 Decode on_get_model_field.
$item->on_get_model_field = base64_decode($item->on_get_model_field);
}
if (!empty($item->on_save_model_field)) if (!empty($item->on_save_model_field))
{ {
// base64 Decode on_save_model_field. // base64 Decode on_save_model_field.
@ -227,10 +240,10 @@ class ComponentbuilderModelField extends AdminModel
$item->initiator_on_get_model = base64_decode($item->initiator_on_get_model); $item->initiator_on_get_model = base64_decode($item->initiator_on_get_model);
} }
if (!empty($item->initiator_on_save_model)) if (!empty($item->javascript_view_footer))
{ {
// base64 Decode initiator_on_save_model. // base64 Decode javascript_view_footer.
$item->initiator_on_save_model = base64_decode($item->initiator_on_save_model); $item->javascript_view_footer = base64_decode($item->javascript_view_footer);
} }
if (!empty($item->css_views)) if (!empty($item->css_views))
@ -245,24 +258,18 @@ class ComponentbuilderModelField extends AdminModel
$item->css_view = base64_decode($item->css_view); $item->css_view = base64_decode($item->css_view);
} }
if (!empty($item->on_get_model_field))
{
// base64 Decode on_get_model_field.
$item->on_get_model_field = base64_decode($item->on_get_model_field);
}
if (!empty($item->javascript_view_footer))
{
// base64 Decode javascript_view_footer.
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
}
if (!empty($item->javascript_views_footer)) if (!empty($item->javascript_views_footer))
{ {
// base64 Decode javascript_views_footer. // base64 Decode javascript_views_footer.
$item->javascript_views_footer = base64_decode($item->javascript_views_footer); $item->javascript_views_footer = base64_decode($item->javascript_views_footer);
} }
if (!empty($item->initiator_on_save_model))
{
// base64 Decode initiator_on_save_model.
$item->initiator_on_save_model = base64_decode($item->initiator_on_save_model);
}
if (!empty($item->xml)) if (!empty($item->xml))
{ {
// JSON Decode xml. // JSON Decode xml.
@ -1172,6 +1179,12 @@ class ComponentbuilderModelField extends AdminModel
$data['xml'] = (string) json_encode($data['xml']); $data['xml'] = (string) json_encode($data['xml']);
} }
// Set the on_get_model_field string to base64 string.
if (isset($data['on_get_model_field']))
{
$data['on_get_model_field'] = base64_encode($data['on_get_model_field']);
}
// Set the on_save_model_field string to base64 string. // Set the on_save_model_field string to base64 string.
if (isset($data['on_save_model_field'])) if (isset($data['on_save_model_field']))
{ {
@ -1184,10 +1197,10 @@ class ComponentbuilderModelField extends AdminModel
$data['initiator_on_get_model'] = base64_encode($data['initiator_on_get_model']); $data['initiator_on_get_model'] = base64_encode($data['initiator_on_get_model']);
} }
// Set the initiator_on_save_model string to base64 string. // Set the javascript_view_footer string to base64 string.
if (isset($data['initiator_on_save_model'])) if (isset($data['javascript_view_footer']))
{ {
$data['initiator_on_save_model'] = base64_encode($data['initiator_on_save_model']); $data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
} }
// Set the css_views string to base64 string. // Set the css_views string to base64 string.
@ -1202,24 +1215,18 @@ class ComponentbuilderModelField extends AdminModel
$data['css_view'] = base64_encode($data['css_view']); $data['css_view'] = base64_encode($data['css_view']);
} }
// Set the on_get_model_field string to base64 string.
if (isset($data['on_get_model_field']))
{
$data['on_get_model_field'] = base64_encode($data['on_get_model_field']);
}
// Set the javascript_view_footer string to base64 string.
if (isset($data['javascript_view_footer']))
{
$data['javascript_view_footer'] = base64_encode($data['javascript_view_footer']);
}
// Set the javascript_views_footer string to base64 string. // Set the javascript_views_footer string to base64 string.
if (isset($data['javascript_views_footer'])) if (isset($data['javascript_views_footer']))
{ {
$data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']); $data['javascript_views_footer'] = base64_encode($data['javascript_views_footer']);
} }
// Set the initiator_on_save_model string to base64 string.
if (isset($data['initiator_on_save_model']))
{
$data['initiator_on_save_model'] = base64_encode($data['initiator_on_save_model']);
}
// Set the Params Items to data // Set the Params Items to data
if (isset($data['params']) && is_array($data['params'])) if (isset($data['params']) && is_array($data['params']))
{ {

View File

@ -346,7 +346,6 @@ class ComponentbuilderModelFields extends ListModel
2 => 'COM_COMPONENTBUILDER_FIELD_BASE64', 2 => 'COM_COMPONENTBUILDER_FIELD_BASE64',
3 => 'COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY', 3 => 'COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY',
5 => 'COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY', 5 => 'COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY',
4 => 'COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION',
6 => 'COM_COMPONENTBUILDER_FIELD_EXPERT_MODE_CUSTOM' 6 => 'COM_COMPONENTBUILDER_FIELD_EXPERT_MODE_CUSTOM'
); );
// Now check if value is found in this array // Now check if value is found in this array
@ -721,22 +720,22 @@ class ComponentbuilderModelFields extends ListModel
continue; continue;
} }
// decode on_get_model_field
$item->on_get_model_field = base64_decode($item->on_get_model_field);
// decode on_save_model_field // decode on_save_model_field
$item->on_save_model_field = base64_decode($item->on_save_model_field); $item->on_save_model_field = base64_decode($item->on_save_model_field);
// decode initiator_on_get_model // decode initiator_on_get_model
$item->initiator_on_get_model = base64_decode($item->initiator_on_get_model); $item->initiator_on_get_model = base64_decode($item->initiator_on_get_model);
// decode initiator_on_save_model // decode javascript_view_footer
$item->initiator_on_save_model = base64_decode($item->initiator_on_save_model); $item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode css_views // decode css_views
$item->css_views = base64_decode($item->css_views); $item->css_views = base64_decode($item->css_views);
// decode css_view // decode css_view
$item->css_view = base64_decode($item->css_view); $item->css_view = base64_decode($item->css_view);
// decode on_get_model_field
$item->on_get_model_field = base64_decode($item->on_get_model_field);
// decode javascript_view_footer
$item->javascript_view_footer = base64_decode($item->javascript_view_footer);
// decode javascript_views_footer // decode javascript_views_footer
$item->javascript_views_footer = base64_decode($item->javascript_views_footer); $item->javascript_views_footer = base64_decode($item->javascript_views_footer);
// decode initiator_on_save_model
$item->initiator_on_save_model = base64_decode($item->initiator_on_save_model);
// unset the values we don't want exported. // unset the values we don't want exported.
unset($item->asset_id); unset($item->asset_id);
unset($item->checked_out); unset($item->checked_out);

View File

@ -40,23 +40,24 @@ class JFormFieldDynamicgets extends JFormFieldList
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name','a.gettype'),array('id','dynamic_get_name','type'))); $query->select($db->quoteName(array('a.id','a.name','a.gettype'),array('id','dynamic_get_name','type')));
$query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a')); $query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a'));
$query->where($db->quoteName('a.published') . ' = 1'); $query->where($db->quoteName('a.published') . ' = 1');
$query->order('a.name ASC'); $query->order('a.name ASC');
$db->setQuery((string)$query); $db->setQuery((string)$query);
$items = $db->loadObjectList(); $items = $db->loadObjectList();
$options = array(); $options = array();
if ($items) if ($items)
{ {
$model = ComponentbuilderHelper::getModel('dynamic_gets'); $model = ComponentbuilderHelper::getModel('dynamic_gets');
foreach($items as $item) foreach($items as $item)
{ {
$type = $model->selectionTranslation($item->type,'gettype'); $type = $model->selectionTranslation($item->type,'gettype');
$options[] = JHtml::_('select.option', $item->id, $item->dynamic_get_name . ' (' . JText::_($type) . ')' ); $options[] = JHtml::_('select.option', $item->id, $item->dynamic_get_name . ' (' . JText::_($type) . ')' );
} }
} }
return $options;
return $options;
} }
} }

View File

@ -53,6 +53,6 @@ class JFormFieldFilebehaviour extends JFormFieldList
$options[] = JHtml::_('select.option', '2', JText::_('COM_COMPONENTBUILDER_CONDITIONS')); $options[] = JHtml::_('select.option', '2', JText::_('COM_COMPONENTBUILDER_CONDITIONS'));
$options[] = JHtml::_('select.option', '3', JText::_('COM_COMPONENTBUILDER_CUSTOM_SCRIPT')); $options[] = JHtml::_('select.option', '3', JText::_('COM_COMPONENTBUILDER_CUSTOM_SCRIPT'));
$options[] = JHtml::_('select.option', '0', JText::_('COM_COMPONENTBUILDER_DO_NOT_ADD')); $options[] = JHtml::_('select.option', '0', JText::_('COM_COMPONENTBUILDER_DO_NOT_ADD'));
return $options; return $options;
} }
} }

View File

@ -144,11 +144,11 @@ class JFormFieldInterfacepowers extends JFormFieldList
protected function getOptions() protected function getOptions()
{ {
// Get the user object. // Get the user object.
$user = JFactory::getUser(); $user = Factory::getUser();
// Get the databse object. // Get the databse object.
$db = JFactory::getDBO(); $db = Factory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.guid','a.name','a.system_name','a.type','a.power_version'),array('guid','implements_name','system_name','type','version'))); $query->select($db->quoteName(array('a.guid','a.name','a.system_name','a.type','a.power_version'),array('guid','extendsinterfaces_name','system_name','type','version')));
$query->from($db->quoteName('#__componentbuilder_power', 'a')); $query->from($db->quoteName('#__componentbuilder_power', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1'); $query->where($db->quoteName('a.published') . ' >= 1');
$query->where($db->quoteName('a.type') . ' = ' . $db->quote('interface')); $query->where($db->quoteName('a.type') . ' = ' . $db->quote('interface'));
@ -165,7 +165,7 @@ class JFormFieldInterfacepowers extends JFormFieldList
} }
} }
// get the input // get the input
$jinput = JFactory::getApplication()->input; $jinput = Factory::getApplication()->input;
// get the id // get the id
$power_id = $jinput->getInt('id', 0); $power_id = $jinput->getInt('id', 0);
// if we have an id we remove all classes of the same namespace and name // if we have an id we remove all classes of the same namespace and name
@ -176,19 +176,24 @@ class JFormFieldInterfacepowers extends JFormFieldList
$db->setQuery((string)$query); $db->setQuery((string)$query);
$items = $db->loadObjectList(); $items = $db->loadObjectList();
$options = array(); $options = array();
// set the other option to enter text // if none was found, we add this to set an alternative to set custom
$options[] = JHtml::_('select.option', -1, JText::_('COM_COMPONENTBUILDER_SET_CUSTOM')); if (!$items)
{
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_NONE_FOUND'));
}
if ($items) if ($items)
{ {
if ($this->multiple === false) if ($this->multiple === false)
{ {
$options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION')); $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
} }
foreach($items as $item) foreach($items as $item)
{ {
$options[] = JHtml::_('select.option', $item->guid, $item->system_name . ' (v' . $item->version . ') [' . $item->type . ' ' . $item->implements_name . ']'); $options[] = Html::_('select.option', $item->guid, $item->system_name . ' [' . $item->type . ' ' . $item->extendsinterfaces_name . '] (v' . $item->version . ')');
} }
} }
// set the other option to enter text
$options[] = Html::_('select.option', -1, Text::_('COM_COMPONENTBUILDER_SET_CUSTOM'));
return $options; return $options;
} }
} }

View File

@ -40,21 +40,22 @@ class JFormFieldLibraryreadonly extends JFormFieldList
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name'),array('id','library_name'))); $query->select($db->quoteName(array('a.id','a.name'),array('id','library_name')));
$query->from($db->quoteName('#__componentbuilder_library', 'a')); $query->from($db->quoteName('#__componentbuilder_library', 'a'));
$query->order('a.name ASC'); $query->order('a.name ASC');
$db->setQuery((string)$query); $db->setQuery((string)$query);
$items = $db->loadObjectList(); $items = $db->loadObjectList();
$options = array(); $options = array();
if ($items) if ($items)
{ {
$options[] = JHtml::_('select.option', '', 'Select an option'); $options[] = JHtml::_('select.option', '', 'Select an option');
foreach($items as $item) foreach($items as $item)
{ {
$options[] = JHtml::_('select.option', $item->id, $item->library_name); $options[] = JHtml::_('select.option', $item->id, $item->library_name);
} }
} }
return $options;
return $options;
} }
} }

View File

@ -144,24 +144,24 @@ class JFormFieldMaingets extends JFormFieldList
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name','a.gettype'),array('id','main_get_name','type'))); $query->select($db->quoteName(array('a.id','a.name','a.gettype'),array('id','main_get_name','type')));
$query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a')); $query->from($db->quoteName('#__componentbuilder_dynamic_get', 'a'));
$query->where($db->quoteName('a.published') . ' = 1'); $query->where($db->quoteName('a.published') . ' = 1');
$query->where('( '.$db->quoteName('a.gettype') . ' = 1 OR ' . $db->quoteName('a.gettype') . ' = 2 )'); $query->where('( '.$db->quoteName('a.gettype') . ' = 1 OR ' . $db->quoteName('a.gettype') . ' = 2 )');
$query->order('a.name ASC'); $query->order('a.name ASC');
$db->setQuery((string)$query); $db->setQuery((string)$query);
$items = $db->loadObjectList(); $items = $db->loadObjectList();
$options = array(); $options = array();
if ($items) if ($items)
{ {
$model = ComponentbuilderHelper::getModel('dynamic_gets'); $model = ComponentbuilderHelper::getModel('dynamic_gets');
foreach($items as $item) foreach($items as $item)
{ {
$type = $model->selectionTranslation($item->type,'gettype'); $type = $model->selectionTranslation($item->type,'gettype');
$options[] = JHtml::_('select.option', $item->id, $item->main_get_name . ' (' . JText::_($type) . ')' ); $options[] = JHtml::_('select.option', $item->id, $item->main_get_name . ' (' . JText::_($type) . ')' );
} }
} }
return $options; return $options;
} }
} }

View File

@ -0,0 +1,71 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Repositoriesfilterbase Form Field class for the Componentbuilder component
*/
class JFormFieldRepositoriesfilterbase extends JFormFieldList
{
/**
* The repositoriesfilterbase field type.
*
* @var string
*/
public $type = 'repositoriesfilterbase';
/**
* Method to get a list of options for a list input.
*
* @return array An array of Html options.
*/
protected function getOptions()
{
// Get a db connection.
$db = Factory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select the text.
$query->select($db->quoteName('base'));
$query->from($db->quoteName('#__componentbuilder_repository'));
$query->order($db->quoteName('base') . ' ASC');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$_results = $db->loadColumn();
$_filter = [];
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_BASE_URL') . ' -');
if ($_results)
{
$_results = array_unique($_results);
foreach ($_results as $base)
{
// Now add the base and its text to the options array
$_filter[] = Html::_('select.option', $base, $base);
}
}
return $_filter;
}
}

View File

@ -0,0 +1,71 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Repositoriesfilterorganisation Form Field class for the Componentbuilder component
*/
class JFormFieldRepositoriesfilterorganisation extends JFormFieldList
{
/**
* The repositoriesfilterorganisation field type.
*
* @var string
*/
public $type = 'repositoriesfilterorganisation';
/**
* Method to get a list of options for a list input.
*
* @return array An array of Html options.
*/
protected function getOptions()
{
// Get a db connection.
$db = Factory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select the text.
$query->select($db->quoteName('organisation'));
$query->from($db->quoteName('#__componentbuilder_repository'));
$query->order($db->quoteName('organisation') . ' ASC');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$_results = $db->loadColumn();
$_filter = [];
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_ORGANISATION') . ' -');
if ($_results)
{
$_results = array_unique($_results);
foreach ($_results as $organisation)
{
// Now add the organisation and its text to the options array
$_filter[] = Html::_('select.option', $organisation, $organisation);
}
}
return $_filter;
}
}

View File

@ -0,0 +1,71 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Repositoriesfilterrepository Form Field class for the Componentbuilder component
*/
class JFormFieldRepositoriesfilterrepository extends JFormFieldList
{
/**
* The repositoriesfilterrepository field type.
*
* @var string
*/
public $type = 'repositoriesfilterrepository';
/**
* Method to get a list of options for a list input.
*
* @return array An array of Html options.
*/
protected function getOptions()
{
// Get a db connection.
$db = Factory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select the text.
$query->select($db->quoteName('repository'));
$query->from($db->quoteName('#__componentbuilder_repository'));
$query->order($db->quoteName('repository') . ' ASC');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$_results = $db->loadColumn();
$_filter = [];
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_REPOSITORY') . ' -');
if ($_results)
{
$_results = array_unique($_results);
foreach ($_results as $repository)
{
// Now add the repository and its text to the options array
$_filter[] = Html::_('select.option', $repository, $repository);
}
}
return $_filter;
}
}

View File

@ -0,0 +1,75 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 30th April, 2015
* @author Llewellyn van der Merwe <https://dev.vdm.io>
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
// import the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Repositoriesfiltertarget Form Field class for the Componentbuilder component
*/
class JFormFieldRepositoriesfiltertarget extends JFormFieldList
{
/**
* The repositoriesfiltertarget field type.
*
* @var string
*/
public $type = 'repositoriesfiltertarget';
/**
* Method to get a list of options for a list input.
*
* @return array An array of Html options.
*/
protected function getOptions()
{
// Get a db connection.
$db = Factory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select the text.
$query->select($db->quoteName('target'));
$query->from($db->quoteName('#__componentbuilder_repository'));
$query->order($db->quoteName('target') . ' ASC');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$_results = $db->loadColumn();
$_filter = [];
$_filter[] = Html::_('select.option', '', '- ' . Text::_('COM_COMPONENTBUILDER_FILTER_SELECT_TARGET_CONTENT') . ' -');
if ($_results)
{
// get repositoriesmodel
$_model = ComponentbuilderHelper::getModel('repositories');
$_results = array_unique($_results);
foreach ($_results as $target)
{
// Translate the target selection
$_text = $_model->selectionTranslation($target,'target');
// Now add the target and its text to the options array
$_filter[] = Html::_('select.option', $target, Text::_($_text));
}
}
return $_filter;
}
}

View File

@ -144,23 +144,24 @@ class JFormFieldServers extends JFormFieldList
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name','a.protocol'),array('id','name', 'protocol'))); $query->select($db->quoteName(array('a.id','a.name','a.protocol'),array('id','name', 'protocol')));
$query->from($db->quoteName('#__componentbuilder_server', 'a')); $query->from($db->quoteName('#__componentbuilder_server', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1'); $query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.name ASC'); $query->order('a.name ASC');
$db->setQuery((string)$query); $db->setQuery((string)$query);
$items = $db->loadObjectList(); $items = $db->loadObjectList();
$options = array(); $options = array();
if ($items) if ($items)
{ {
$options[] = JHtml::_('select.option', '', 'Select an option'); $options[] = JHtml::_('select.option', '', 'Select an option');
foreach($items as $item) foreach($items as $item)
{ {
$item->protocol = ($item->protocol == 2) ? JText::_('SFTP') : JText::_('FTP'); $item->protocol = ($item->protocol == 2) ? JText::_('SFTP') : JText::_('FTP');
$options[] = JHtml::_('select.option', $item->id, $item->name.' ['.$item->protocol.']'); $options[] = JHtml::_('select.option', $item->id, $item->name.' ['.$item->protocol.']');
} }
} }
return $options;
return $options;
} }
} }

View File

@ -144,28 +144,29 @@ class JFormFieldSnippets extends JFormFieldList
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name','b.name','c.name'),array('id','snippet_name','type','library'))); $query->select($db->quoteName(array('a.id','a.name','b.name','c.name'),array('id','snippet_name','type','library')));
$query->from($db->quoteName('#__componentbuilder_snippet', 'a')); $query->from($db->quoteName('#__componentbuilder_snippet', 'a'));
// From the componentbuilder_snippet_type table. // From the componentbuilder_snippet_type table.
$query->join('LEFT', $db->quoteName('#__componentbuilder_snippet_type', 'b') . ' ON (' . $db->quoteName('a.type') . ' = ' . $db->quoteName('b.id') . ')'); $query->join('LEFT', $db->quoteName('#__componentbuilder_snippet_type', 'b') . ' ON (' . $db->quoteName('a.type') . ' = ' . $db->quoteName('b.id') . ')');
// From the componentbuilder_library table. // From the componentbuilder_library table.
$query->join('LEFT', $db->quoteName('#__componentbuilder_library', 'c') . ' ON (' . $db->quoteName('a.library') . ' = ' . $db->quoteName('c.id') . ')'); $query->join('LEFT', $db->quoteName('#__componentbuilder_library', 'c') . ' ON (' . $db->quoteName('a.library') . ' = ' . $db->quoteName('c.id') . ')');
$query->where($db->quoteName('a.published') . ' >= 1'); $query->where($db->quoteName('a.published') . ' >= 1');
$query->order('c.ordering ASC'); $query->order('c.ordering ASC');
$query->order('b.name ASC'); $query->order('b.name ASC');
$db->setQuery((string)$query); $db->setQuery((string)$query);
$items = $db->loadObjectList(); $items = $db->loadObjectList();
$options = array(); $options = array();
if ($items) if ($items)
{ {
foreach($items as $item) foreach($items as $item)
{ {
$lib = (isset($item->library) && ComponentbuilderHelper::checkString($item->library)) ? ' (' . $item->library . ')' :''; $lib = (isset($item->library) && ComponentbuilderHelper::checkString($item->library)) ? ' (' . $item->library . ')' :'';
$type = (isset($item->type) && ComponentbuilderHelper::checkString($item->type)) ? $item->type :JText::_('COM_COMPONENTBUILDER_NO_TYPE'); $type = (isset($item->type) && ComponentbuilderHelper::checkString($item->type)) ? $item->type :JText::_('COM_COMPONENTBUILDER_NO_TYPE');
$options[] = JHtml::_('select.option', $item->id, $type . ' - ' . $item->snippet_name . $lib ); $options[] = JHtml::_('select.option', $item->id, $type . ' - ' . $item->snippet_name . $lib );
} }
} }
return $options;
return $options;
} }
} }

View File

@ -40,22 +40,23 @@ class JFormFieldSnippettype extends JFormFieldList
protected function getOptions() protected function getOptions()
{ {
$db = JFactory::getDBO(); $db = JFactory::getDBO();
$query = $db->getQuery(true); $query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name'),array('id','type_name'))); $query->select($db->quoteName(array('a.id','a.name'),array('id','type_name')));
$query->from($db->quoteName('#__componentbuilder_snippet_type', 'a')); $query->from($db->quoteName('#__componentbuilder_snippet_type', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1'); $query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.name ASC'); $query->order('a.name ASC');
$db->setQuery((string)$query); $db->setQuery((string)$query);
$items = $db->loadObjectList(); $items = $db->loadObjectList();
$options = array(); $options = array();
if ($items) if ($items)
{ {
$options[] = JHtml::_('select.option', '', 'Select an option'); $options[] = JHtml::_('select.option', '', 'Select an option');
foreach($items as $item) foreach($items as $item)
{ {
$options[] = JHtml::_('select.option', $item->id, $item->type_name); $options[] = JHtml::_('select.option', $item->id, $item->type_name);
} }
} }
return $options;
return $options;
} }
} }

View File

@ -15,7 +15,6 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory; use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text; use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html; use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\Component\Helper;
jimport('joomla.form.helper'); jimport('joomla.form.helper');
\JFormHelper::loadFieldClass('checkboxes'); \JFormHelper::loadFieldClass('checkboxes');
@ -33,69 +32,41 @@ class JFormFieldSuperpowerpaths extends JFormFieldCheckboxes
// A DynamicCheckboxes@ Field // A DynamicCheckboxes@ Field
/** /**
* Method to get the data to be passed to the layout for rendering. * Method to get the field options.
* *
* @return array * @return array The field option objects.
* *
* @since 3.5 * @since 3.7.0
*/ */
protected function getLayoutData() protected function getOptions()
{ {
$data = parent::getLayoutData(); // Get the databse object.
$db = Factory::getDBO();
// True if the field has 'value' set. In other words, it has been stored, don't use the default values. $query = $db->getQuery(true);
$hasValue = (isset($this->value) && !empty($this->value)); $query->select($db->quoteName(array('a.repository', 'a.organisation')))
->from($db->quoteName('#__componentbuilder_repository', 'a'))
// If a value has been stored, use it. Otherwise, use the defaults. ->where($db->quoteName('a.published') . ' >= 1')
$checkedOptions = $hasValue ? $this->value : $this->checkedOptions; ->where($db->quoteName('a.target') . ' = 1') // super powers
->order($db->quoteName('a.ordering') . ' ASC');
// get the form options $db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = []; $options = [];
if ($items)
// get the component params
$params = Helper::getParams();
$activate = $params->get('super_powers_repositories', 0);
// set the default
$default = $params->get('super_powers_core', 'joomla/super-powers');
// must have one / in the path
if (strpos($default, '/') !== false)
{ {
$tmp = new \stdClass; if ($this->multiple === false)
$tmp->text = $tmp->value = trim($default); {
$tmp->checked = false; $options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
$options[$tmp->value] = $tmp;
} }
foreach($items as $item)
if ($activate == 1)
{ {
$subform = $params->get($this->fieldname); $path = $item->organisation . '/' . $item->repository;
$options[] = Html::_('select.option', $path, $path);
// add the paths found in global settings
if (is_object($subform))
{
foreach ($subform as $value)
{
if (isset($value->owner) && strlen($value->owner) > 1 &&
isset($value->repo) && strlen($value->repo) > 1)
{
$tmp = new \stdClass;
$tmp->text = $tmp->value = trim($value->owner) . '/' . trim($value->repo);
$tmp->checked = false;
$options[$tmp->value] = $tmp;
} }
} }
else
{
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_NO_ACTIVE_REPOSITORIES_FOUND'));
} }
} return $options;
$extraData = array(
'checkedOptions' => is_array($checkedOptions) ? $checkedOptions : explode(',', (string) $checkedOptions),
'hasValue' => $hasValue,
'options' => array_values($options)
);
return array_merge($data, $extraData);
} }
} }

View File

@ -113,10 +113,18 @@ class ComponentbuilderModelFieldtype extends AdminModel
/** /**
* get VDM internal session key * Retrieves or generates a Vast Development Method (VDM) key for the current item.
* *
* @return string the session key * This function performs the following operations:
* 1. Checks if the VDM key is already set. If not, it proceeds to generate or retrieve one.
* 2. Determines the item ID based on the presence of a specific argument.
* 3. Attempts to retrieve an existing VDM key from a helper method using the item ID.
* 4. If a VDM key is not found, it generates a new random VDM key.
* 5. Stores the VDM key and associates it with the item ID in a helper method.
* 6. Optionally, stores return and GUID values if available.
* 7. Returns the VDM key.
* *
* @return string The VDM key for the current item.
*/ */
public function getVDM() public function getVDM()
{ {
@ -257,7 +265,7 @@ class ComponentbuilderModelFieldtype extends AdminModel
* *
* @return mixed An array of data items on success, false on failure. * @return mixed An array of data items on success, false on failure.
*/ */
public function getVxtfields() public function getVxsfields()
{ {
// Get the user object. // Get the user object.
$user = Factory::getUser(); $user = Factory::getUser();
@ -399,13 +407,13 @@ class ComponentbuilderModelFieldtype extends AdminModel
foreach ($items as $nr => &$item) foreach ($items as $nr => &$item)
{ {
// convert datatype // convert datatype
$item->datatype = $this->selectionTranslationVxtfields($item->datatype, 'datatype'); $item->datatype = $this->selectionTranslationVxsfields($item->datatype, 'datatype');
// convert indexes // convert indexes
$item->indexes = $this->selectionTranslationVxtfields($item->indexes, 'indexes'); $item->indexes = $this->selectionTranslationVxsfields($item->indexes, 'indexes');
// convert null_switch // convert null_switch
$item->null_switch = $this->selectionTranslationVxtfields($item->null_switch, 'null_switch'); $item->null_switch = $this->selectionTranslationVxsfields($item->null_switch, 'null_switch');
// convert store // convert store
$item->store = $this->selectionTranslationVxtfields($item->store, 'store'); $item->store = $this->selectionTranslationVxsfields($item->store, 'store');
} }
} }
@ -419,7 +427,7 @@ class ComponentbuilderModelFieldtype extends AdminModel
* *
* @return string The translatable string. * @return string The translatable string.
*/ */
public function selectionTranslationVxtfields($value,$name) public function selectionTranslationVxsfields($value,$name)
{ {
// Array of datatype language strings // Array of datatype language strings
if ($name === 'datatype') if ($name === 'datatype')
@ -487,7 +495,6 @@ class ComponentbuilderModelFieldtype extends AdminModel
2 => 'COM_COMPONENTBUILDER_FIELD_BASE64', 2 => 'COM_COMPONENTBUILDER_FIELD_BASE64',
3 => 'COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY', 3 => 'COM_COMPONENTBUILDER_FIELD_BASIC_ENCRYPTION_LOCALDBKEY',
5 => 'COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY', 5 => 'COM_COMPONENTBUILDER_FIELD_MEDIUM_ENCRYPTION_LOCALFILEKEY',
4 => 'COM_COMPONENTBUILDER_FIELD_WHMCSKEY_ENCRYPTION',
6 => 'COM_COMPONENTBUILDER_FIELD_EXPERT_MODE_CUSTOM' 6 => 'COM_COMPONENTBUILDER_FIELD_EXPERT_MODE_CUSTOM'
); );
// Now check if value is found in this array // Now check if value is found in this array

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_LABEL" label="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_CUSTOM_TABS_ADMIN_VIEW_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="" default=""
required="true" required="true"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADMIN_VIEW_LABEL" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADMIN_VIEW_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADMIN_VIEW_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_ADMIN_VIEW_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="" default=""
required="true" required="true"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADMIN_VIEW_LABEL" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADMIN_VIEW_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADMIN_VIEW_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_CONDITIONS_ADMIN_VIEW_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="" default=""
required="true" required="true"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADMIN_VIEW_LABEL" label="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADMIN_VIEW_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADMIN_VIEW_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_FIELDS_RELATIONS_ADMIN_VIEW_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="" default=""
required="true" required="true"

View File

@ -308,6 +308,7 @@
label="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_CHARSET_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_CHARSET_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_CHARSET_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_CHARSET_DESCRIPTION"
class="list_class bestview" class="list_class bestview"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
filter="CMD" filter="CMD"
required="true" required="true"
@ -419,6 +420,7 @@
label="COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_DESCRIPTION"
class="btn-group" class="btn-group"
layout="joomla.form.field.list-fancy-select"
filter="INT" filter="INT"
default="1"> default="1">
<!-- Option Set. --> <!-- Option Set. -->
@ -849,6 +851,7 @@
label="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ROW_FORMAT_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ROW_FORMAT_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ROW_FORMAT_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ROW_FORMAT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
default="DYNAMIC"> default="DYNAMIC">
@ -1915,6 +1918,7 @@
label="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ENGINE_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ENGINE_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ENGINE_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_ENGINE_DESCRIPTION"
class="list_class bestview" class="list_class bestview"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
filter="CMD" filter="CMD"
required="true" required="true"
@ -1954,6 +1958,7 @@
label="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_COLLATE_LABEL" label="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_COLLATE_LABEL"
description="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_COLLATE_DESCRIPTION" description="COM_COMPONENTBUILDER_ADMIN_VIEW_MYSQL_TABLE_COLLATE_DESCRIPTION"
class="list_class bestview" class="list_class bestview"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
filter="CMD" filter="CMD"
required="true" required="true"

View File

@ -117,6 +117,7 @@
label="COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_LABEL" label="COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_LABEL"
description="COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_DESCRIPTION" description="COM_COMPONENTBUILDER_CLASS_EXTENDS_EXTENSION_TYPE_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true"> required="true">
<!-- Option Set. --> <!-- Option Set. -->

View File

@ -117,6 +117,7 @@
label="COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_LABEL" label="COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_LABEL"
description="COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_DESCRIPTION" description="COM_COMPONENTBUILDER_CLASS_METHOD_VISIBILITY_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
filter="STRING" filter="STRING"
required="true"> required="true">
@ -141,6 +142,7 @@
label="COM_COMPONENTBUILDER_CLASS_METHOD_EXTENSION_TYPE_LABEL" label="COM_COMPONENTBUILDER_CLASS_METHOD_EXTENSION_TYPE_LABEL"
description="COM_COMPONENTBUILDER_CLASS_METHOD_EXTENSION_TYPE_DESCRIPTION" description="COM_COMPONENTBUILDER_CLASS_METHOD_EXTENSION_TYPE_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true"> required="true">
<!-- Option Set. --> <!-- Option Set. -->
@ -204,6 +206,7 @@
name="joomla_plugin_group" name="joomla_plugin_group"
label="COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_LABEL" label="COM_COMPONENTBUILDER_CLASS_METHOD_JOOMLA_PLUGIN_GROUP_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="true" required="true"

View File

@ -117,6 +117,7 @@
label="COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_LABEL" label="COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_LABEL"
description="COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_DESCRIPTION" description="COM_COMPONENTBUILDER_CLASS_PROPERTY_VISIBILITY_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
filter="STRING" filter="STRING"
required="true"> required="true">
@ -141,6 +142,7 @@
label="COM_COMPONENTBUILDER_CLASS_PROPERTY_EXTENSION_TYPE_LABEL" label="COM_COMPONENTBUILDER_CLASS_PROPERTY_EXTENSION_TYPE_LABEL"
description="COM_COMPONENTBUILDER_CLASS_PROPERTY_EXTENSION_TYPE_DESCRIPTION" description="COM_COMPONENTBUILDER_CLASS_PROPERTY_EXTENSION_TYPE_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true"> required="true">
<!-- Option Set. --> <!-- Option Set. -->
@ -188,6 +190,7 @@
name="joomla_plugin_group" name="joomla_plugin_group"
label="COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_LABEL" label="COM_COMPONENTBUILDER_CLASS_PROPERTY_JOOMLA_PLUGIN_GROUP_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="true" required="true"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
readonly="true" readonly="true"
@ -112,6 +113,7 @@
name="clone_me" name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CLONE_ME_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_ADMIN_VIEWS_CLONE_ME_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="false" required="false"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_CONFIG_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
readonly="true" readonly="true"
@ -112,6 +113,7 @@
name="clone_me" name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_CONFIG_CLONE_ME_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_CONFIG_CLONE_ME_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="false" required="false"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
readonly="true" readonly="true"
@ -112,6 +113,7 @@
name="clone_me" name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_CLONE_ME_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_MENUS_CLONE_ME_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="false" required="false"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
readonly="true" readonly="true"
@ -112,6 +113,7 @@
name="clone_me" name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CLONE_ME_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_CLONE_ME_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="false" required="false"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
readonly="true" readonly="true"
@ -112,6 +113,7 @@
name="clone_me" name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CLONE_ME_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CLONE_ME_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="false" required="false"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
readonly="true" readonly="true"
@ -112,6 +113,7 @@
name="clone_me" name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CLONE_ME_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CLONE_ME_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="false" required="false"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_MODULES_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
readonly="true" readonly="true"
@ -112,6 +113,7 @@
name="clone_me" name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_MODULES_CLONE_ME_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_MODULES_CLONE_ME_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="false" required="false"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
readonly="true" readonly="true"
@ -112,6 +113,7 @@
name="clone_me" name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_CLONE_ME_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_CLONE_ME_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="false" required="false"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
readonly="true" readonly="true"
@ -112,6 +113,7 @@
name="clone_me" name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_CLONE_ME_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_CLONE_ME_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="false" required="false"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
readonly="true" readonly="true"
@ -112,6 +113,7 @@
name="clone_me" name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_CLONE_ME_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_PLUGINS_CLONE_ME_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="false" required="false"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_ROUTER_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
readonly="true" readonly="true"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
readonly="true" readonly="true"
@ -112,6 +113,7 @@
name="clone_me" name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_CLONE_ME_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_SITE_VIEWS_CLONE_ME_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="false" required="false"

View File

@ -101,6 +101,7 @@
label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_LABEL"
description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_DESCRIPTION" description="COM_COMPONENTBUILDER_COMPONENT_UPDATES_JOOMLA_COMPONENT_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="true" required="true"
readonly="true" readonly="true"
@ -112,6 +113,7 @@
name="clone_me" name="clone_me"
label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_CLONE_ME_LABEL" label="COM_COMPONENTBUILDER_COMPONENT_UPDATES_CLONE_ME_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="false" required="false"

View File

@ -146,6 +146,7 @@
name="main_get" name="main_get"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_DESCRIPTION" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_MAIN_GET_DESCRIPTION"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="" default=""
required="true" required="true"
@ -274,6 +275,7 @@
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_LABEL" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_DESCRIPTION" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_SNIPPET_DESCRIPTION"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
required="false" required="false"
button="true" button="true"
@ -604,6 +606,7 @@
name="dynamic_get" name="dynamic_get"
label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DYNAMIC_GET_LABEL" label="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DYNAMIC_GET_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DYNAMIC_GET_DESCRIPTION" description="COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW_DYNAMIC_GET_DESCRIPTION"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="" default=""
required="false" required="false"

View File

@ -100,6 +100,7 @@
name="component" name="component"
label="COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL" label="COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL"
class="list_class" class="list_class"
layout="joomla.form.field.list-fancy-select"
multiple="false" multiple="false"
default="0" default="0"
required="true" required="true"

Some files were not shown because too many files have changed in this diff Show More