";throw e}},j.Parser=L,j.parser=L.parse,j.Renderer=Z,j.TextRenderer=O,j.Lexer=I,j.lexer=I.lex,j.Tokenizer=z,j.Slugger=q;var P=(j.parse=j).options,Q=j.setOptions,U=j.use,M=j.walkTokens,N=j.parseInline,X=j,G=L.parse,E=I.lex;r.Lexer=I,r.Parser=L,r.Renderer=Z,r.Slugger=q,r.TextRenderer=O,r.Tokenizer=z,r.getDefaults=e,r.lexer=E,r.marked=j,r.options=P,r.parse=X,r.parseInline=N,r.parser=G,r.setOptions=Q,r.use=U,r.walkTokens=M,Object.defineProperty(r,"__esModule",{value:!0})});
\ No newline at end of file
diff --git a/admin/helpers/compiler/a_Get.php b/admin/helpers/compiler/a_Get.php
index 6fe093539..da9328e2d 100644
--- a/admin/helpers/compiler/a_Get.php
+++ b/admin/helpers/compiler/a_Get.php
@@ -4703,6 +4703,11 @@ class Get
'type' => 'php');
foreach ($results as $_nr => &$result)
{
+ // Trigger Event: jcb_ce_onBeforeModelDynamicGetData
+ $this->triggerEvent(
+ 'jcb_ce_onBeforeModelDynamicGetData',
+ array(&$this->componentContext, &$result, &$result->id, &$view_code, &$context)
+ );
// set GUI mapper id
$guiMapper['id'] = (int) $result->id;
// add calculations if set
@@ -5213,6 +5218,11 @@ class Get
{
$result->plugin_events = '';
}
+ // Trigger Event: jcb_ce_onAfterModelDynamicGetData
+ $this->triggerEvent(
+ 'jcb_ce_onAfterModelDynamicGetData',
+ array(&$this->componentContext, &$result, &$result->id, &$view_code, &$context)
+ );
}
return $results;
diff --git a/admin/helpers/compiler/e_Interpretation.php b/admin/helpers/compiler/e_Interpretation.php
index 2c20bd99c..515e6b16e 100644
--- a/admin/helpers/compiler/e_Interpretation.php
+++ b/admin/helpers/compiler/e_Interpretation.php
@@ -10263,7 +10263,7 @@ class Interpretation extends Fields
$db = '';
foreach ($this->queryBuilder as $view => $fields)
{
- // build the uninstall array
+ // build the uninstallation array
$this->uninstallBuilder[] = "DROP TABLE IF EXISTS `#__"
. $component . "_" . $view . "`;";
@@ -10355,10 +10355,17 @@ class Interpretation extends Fields
)
&& in_array($data['ID'], $this->addSQL['field'][$view]))
{
+ // to soon....
+ //$this->updateSQLBuilder["ALTERTABLE`#__" . $component
+ //. "_" . $view . "`ADDCOLUMNIFNOTEXISTS`" . $field . "`"]
+ // = "ALTER TABLE `#__" . $component . "_" . $view
+ // . "` ADD COLUMN IF NOT EXISTS `" . $field . "` " . $data['type']
+ // . $lenght . " " . $default . " AFTER `" . $last_name
+ // . "`;";
$this->updateSQLBuilder["ALTERTABLE`#__" . $component
- . "_" . $view . "`ADDCOLUMNIFNOTEXISTS`" . $field . "`"]
+ . "_" . $view . "`ADD`" . $field . "`"]
= "ALTER TABLE `#__" . $component . "_" . $view
- . "` ADD COLUMN IF NOT EXISTS `" . $field . "` " . $data['type']
+ . "` ADD `" . $field . "` " . $data['type']
. $lenght . " " . $default . " AFTER `" . $last_name
. "`;";
}
@@ -10409,55 +10416,55 @@ class Interpretation extends Fields
{
$db_ .= PHP_EOL . $this->_t(1) . "`params` text NULL,";
}
- // check if default field was over written
+ // check if default field was overwritten
if (!isset($this->fieldsNames[$view]['published']))
{
$db_ .= PHP_EOL . $this->_t(1)
. "`published` TINYINT(3) NOT NULL DEFAULT 1,";
}
- // check if default field was over written
+ // check if default field was overwritten
if (!isset($this->fieldsNames[$view]['created_by']))
{
$db_ .= PHP_EOL . $this->_t(1)
. "`created_by` INT(10) unsigned NOT NULL DEFAULT 0,";
}
- // check if default field was over written
+ // check if default field was overwritten
if (!isset($this->fieldsNames[$view]['modified_by']))
{
$db_ .= PHP_EOL . $this->_t(1)
. "`modified_by` INT(10) unsigned NOT NULL DEFAULT 0,";
}
- // check if default field was over written
+ // check if default field was overwritten
if (!isset($this->fieldsNames[$view]['created']))
{
$db_ .= PHP_EOL . $this->_t(1)
. "`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',";
}
- // check if default field was over written
+ // check if default field was overwritten
if (!isset($this->fieldsNames[$view]['modified']))
{
$db_ .= PHP_EOL . $this->_t(1)
. "`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',";
}
- // check if default field was over written
+ // check if default field was overwritten
if (!isset($this->fieldsNames[$view]['checked_out']))
{
$db_ .= PHP_EOL . $this->_t(1)
. "`checked_out` int(11) unsigned NOT NULL DEFAULT 0,";
}
- // check if default field was over written
+ // check if default field was overwritten
if (!isset($this->fieldsNames[$view]['checked_out_time']))
{
$db_ .= PHP_EOL . $this->_t(1)
. "`checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',";
}
- // check if default field was over written
+ // check if default field was overwritten
if (!isset($this->fieldsNames[$view]['version']))
{
$db_ .= PHP_EOL . $this->_t(1)
. "`version` INT(10) unsigned NOT NULL DEFAULT 1,";
}
- // check if default field was over written
+ // check if default field was overwritten
if (!isset($this->fieldsNames[$view]['hits']))
{
$db_ .= PHP_EOL . $this->_t(1)
diff --git a/admin/helpers/componentbuilder.php b/admin/helpers/componentbuilder.php
index 24da55931..462a4bc60 100644
--- a/admin/helpers/componentbuilder.php
+++ b/admin/helpers/componentbuilder.php
@@ -2061,7 +2061,7 @@ abstract class ComponentbuilderHelper
'hash' => '84478dfa0cd880395815e0ee026812a4',
'html' => ''),
array(
- 'url' => 'https://allmycms.com/images/banners/agerix/agerix-loves-jcb-728-90.gif',
+ 'url' => 'https://cms-experts.org/images/banners/agerix/agerix-loves-jcb-728-90.gif',
'hash' => 'b24c0726aa809cdcc04bcffe7e1e1529',
'html' => '')
),
diff --git a/admin/language/en-GB/en-GB.com_componentbuilder.ini b/admin/language/en-GB/en-GB.com_componentbuilder.ini
index 25ac40906..5625683e4 100644
--- a/admin/language/en-GB/en-GB.com_componentbuilder.ini
+++ b/admin/language/en-GB/en-GB.com_componentbuilder.ini
@@ -2813,6 +2813,8 @@ COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_YOUTUBE="Youtube"
COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ZOOM_IN="Zoom In"
COM_COMPONENTBUILDER_COMPONENT_CUSTOM_ADMIN_VIEWS_ZOOM_OUT="Zoom Out"
COM_COMPONENTBUILDER_COMPONENT_DASHBOARD="Component Dashboard"
+COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CLONE="Clone"
+COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CLONE_ME_LABEL="Clone"
COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CREATED_BY_DESC="The user that created this Component Dashboard."
COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_CREATED_DATE_DESC="The date this Component Dashboard was created."
@@ -2843,6 +2845,8 @@ COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_HINT="Name Here"
COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_LABEL="Name"
COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NEW="A New Component Dashboard"
+COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NOTE_HOW_TO_CLONE_DESCRIPTION="There has often been the case that we have two or more components_dashboard that should be exactly the same. Just selecting that component_dashboard and clicking save, will overwrite this component_dashboard with that selected component_dashboard data."
+COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NOTE_HOW_TO_CLONE_LABEL="How to clone another component_dashboard's values into this one."
COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_NOTE_PHP_DASHBOARD_NOTE_DESCRIPTION="Adding custom PHP method to the dashboard model use the public function getMethodName() to insure the data is set to the view, Note the convention public function get...() replace the ... with the unique method name."
COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_COMPONENT_DASHBOARD_PERMISSION="Permissions"
@@ -2865,6 +2869,8 @@ COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFOLDERS_DESCRIPTION="Add custom
COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADDFOLDERS_LABEL="Folder (custom folder)"
COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ADVANCE="Advance"
COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_BASIC="Basic"
+COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CLONE="Clone"
+COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CLONE_ME_LABEL="Clone"
COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CREATED_BY_DESC="The user that created this Component Files & Folders."
COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_CREATED_DATE_DESC="The date this Component Files & Folders was created."
@@ -2938,6 +2944,8 @@ If you are in the installation application:
JPATH_BASE == JPATH_INSTALLATION.
JPATH_ROOT is the root path for the Joomla install and does not depend upon any application."
COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_CONSTANT_PATHS_LABEL="Constant Paths"
+COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_HOW_TO_CLONE_DESCRIPTION="There has often been the case that we have two or more components_files_folders that should be exactly the same. Just selecting that component_files_folders and clicking save, will overwrite this component_files_folders with that selected component_files_folders data."
+COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTE_HOW_TO_CLONE_LABEL="How to clone another component_files_folders's values into this one."
COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_DESCRIPTION="Should file be updated."
COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_NOTNEW_LABEL="Update"
COM_COMPONENTBUILDER_COMPONENT_FILES_FOLDERS_ORDERING_LABEL="Ordering"
@@ -2956,6 +2964,8 @@ COM_COMPONENTBUILDER_COMPONENT_GLOBAL_SETTINGS="Component Global Settings"
COM_COMPONENTBUILDER_COMPONENT_MODULES="Component Modules"
COM_COMPONENTBUILDER_COMPONENT_MODULES_ADDJOOMLA_MODULES_DESCRIPTION="Setup the Joomla modules for this component."
COM_COMPONENTBUILDER_COMPONENT_MODULES_ADDJOOMLA_MODULES_LABEL="Joomla Modules"
+COM_COMPONENTBUILDER_COMPONENT_MODULES_CLONE="Clone"
+COM_COMPONENTBUILDER_COMPONENT_MODULES_CLONE_ME_LABEL="Clone"
COM_COMPONENTBUILDER_COMPONENT_MODULES_COMPILE_AMP_EXPORT="Compile & Export"
COM_COMPONENTBUILDER_COMPONENT_MODULES_COMPILE_ONLY="Compile (only)"
COM_COMPONENTBUILDER_COMPONENT_MODULES_CREATED_BY_DESC="The user that created this Component Modules."
@@ -2976,6 +2986,8 @@ COM_COMPONENTBUILDER_COMPONENT_MODULES_MODULE="Module"
COM_COMPONENTBUILDER_COMPONENT_MODULES_MODULES="Modules"
COM_COMPONENTBUILDER_COMPONENT_MODULES_MODULE_LABEL="Modules"
COM_COMPONENTBUILDER_COMPONENT_MODULES_NEW="A New Component Modules"
+COM_COMPONENTBUILDER_COMPONENT_MODULES_NOTE_HOW_TO_CLONE_DESCRIPTION="There has often been the case that we have two or more components_modules that should be exactly the same. Just selecting that component_modules and clicking save, will overwrite this component_modules with that selected component_modules data."
+COM_COMPONENTBUILDER_COMPONENT_MODULES_NOTE_HOW_TO_CLONE_LABEL="How to clone another component_modules's values into this one."
COM_COMPONENTBUILDER_COMPONENT_MODULES_NOTE_ON_JOOMLA_MODULES_DESCRIPTION="Do not add the same Joomla modules twice it will not work."
COM_COMPONENTBUILDER_COMPONENT_MODULES_NOTE_ON_JOOMLA_MODULES_LABEL="Setting Joomla Modules"
COM_COMPONENTBUILDER_COMPONENT_MODULES_ORDERING_LABEL="Ordering"
@@ -3034,6 +3046,8 @@ COM_COMPONENTBUILDER_COMPONENT_MYSQL_TWEAKS_YES_INCLUDE_BASED_ON_OPTIONS="Yes in
COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS="Component Placeholders"
COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_ADDPLACEHOLDERS_DESCRIPTION="Set dnamic placeholders for this component."
COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_ADDPLACEHOLDERS_LABEL="Placeholders"
+COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_CLONE="Clone"
+COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_CLONE_ME_LABEL="Clone"
COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_CREATED_BY_DESC="The user that created this Component Placeholders."
COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_CREATED_DATE_DESC="The date this Component Placeholders was created."
@@ -3049,6 +3063,8 @@ COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_MODIFIED_BY_LABEL="Modified By"
COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_MODIFIED_DATE_DESC="The date this Component Placeholders was modified."
COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_MODIFIED_DATE_LABEL="Modified Date"
COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_NEW="A New Component Placeholders"
+COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_NOTE_HOW_TO_CLONE_DESCRIPTION="There has often been the case that we have two or more components_placeholders that should be exactly the same. Just selecting that component_placeholders and clicking save, will overwrite this component_placeholders with that selected component_placeholders data."
+COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_NOTE_HOW_TO_CLONE_LABEL="How to clone another component_placeholders's values into this one."
COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_PERMISSION="Permissions"
COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_PUBLISHING="Publishing"
@@ -3067,6 +3083,8 @@ COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_VERSION_LABEL="Version"
COM_COMPONENTBUILDER_COMPONENT_PLUGINS="Component Plugins"
COM_COMPONENTBUILDER_COMPONENT_PLUGINS_ADDJOOMLA_PLUGINS_DESCRIPTION="Setup the Joomla plugins for this component."
COM_COMPONENTBUILDER_COMPONENT_PLUGINS_ADDJOOMLA_PLUGINS_LABEL="Joomla Plugins"
+COM_COMPONENTBUILDER_COMPONENT_PLUGINS_CLONE="Clone"
+COM_COMPONENTBUILDER_COMPONENT_PLUGINS_CLONE_ME_LABEL="Clone"
COM_COMPONENTBUILDER_COMPONENT_PLUGINS_COMPILE_AMP_EXPORT="Compile & Export"
COM_COMPONENTBUILDER_COMPONENT_PLUGINS_COMPILE_ONLY="Compile (only)"
COM_COMPONENTBUILDER_COMPONENT_PLUGINS_CREATED_BY_DESC="The user that created this Component Plugins."
@@ -3084,6 +3102,8 @@ COM_COMPONENTBUILDER_COMPONENT_PLUGINS_MODIFIED_BY_LABEL="Modified By"
COM_COMPONENTBUILDER_COMPONENT_PLUGINS_MODIFIED_DATE_DESC="The date this Component Plugins was modified."
COM_COMPONENTBUILDER_COMPONENT_PLUGINS_MODIFIED_DATE_LABEL="Modified Date"
COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NEW="A New Component Plugins"
+COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NOTE_HOW_TO_CLONE_DESCRIPTION="There has often been the case that we have two or more components_plugins that should be exactly the same. Just selecting that component_plugins and clicking save, will overwrite this component_plugins with that selected component_plugins data."
+COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NOTE_HOW_TO_CLONE_LABEL="How to clone another component_plugins's values into this one."
COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NOTE_ON_JOOMLA_PLUGINS_DESCRIPTION="Do not add the same Joomla plugins twice it will not work."
COM_COMPONENTBUILDER_COMPONENT_PLUGINS_NOTE_ON_JOOMLA_PLUGINS_LABEL="Setting Joomla Plugins"
COM_COMPONENTBUILDER_COMPONENT_PLUGINS_ORDERING_LABEL="Ordering"
diff --git a/admin/layouts/component_dashboard/clone_left.php b/admin/layouts/component_dashboard/clone_left.php
new file mode 100644
index 000000000..d240e31d2
--- /dev/null
+++ b/admin/layouts/component_dashboard/clone_left.php
@@ -0,0 +1,44 @@
+
+ * @gitea Joomla Component Builder
+ * @github 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(
+ 'note_how_to_clone',
+ 'clone_me'
+);
+
+$hiddenFields = $displayData->get('hidden_fields') ?: array();
+
+?>
+
+
+
+ setFieldAttribute($field, 'type', 'hidden'); ?>
+
+ renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
+
diff --git a/admin/layouts/component_dashboard/dashboard_fullwidth.php b/admin/layouts/component_dashboard/dashboard_fullwidth.php
index 5a4a6f0c1..49bfd713b 100644
--- a/admin/layouts/component_dashboard/dashboard_fullwidth.php
+++ b/admin/layouts/component_dashboard/dashboard_fullwidth.php
@@ -28,8 +28,8 @@ $fields_tab_layout = 'fields_' . $layout_path_array[1];
// get the fields
$fields = $displayData->get($fields_tab_layout) ?: array(
'note_php_dashboard_note',
- 'php_dashboard_methods',
- 'dashboard_tab'
+ 'dashboard_tab',
+ 'php_dashboard_methods'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
diff --git a/admin/layouts/component_files_folders/clone_left.php b/admin/layouts/component_files_folders/clone_left.php
new file mode 100644
index 000000000..d240e31d2
--- /dev/null
+++ b/admin/layouts/component_files_folders/clone_left.php
@@ -0,0 +1,44 @@
+
+ * @gitea Joomla Component Builder
+ * @github 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(
+ 'note_how_to_clone',
+ 'clone_me'
+);
+
+$hiddenFields = $displayData->get('hidden_fields') ?: array();
+
+?>
+
+
+
+ setFieldAttribute($field, 'type', 'hidden'); ?>
+
+ renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
+
diff --git a/admin/layouts/component_modules/clone_left.php b/admin/layouts/component_modules/clone_left.php
new file mode 100644
index 000000000..d240e31d2
--- /dev/null
+++ b/admin/layouts/component_modules/clone_left.php
@@ -0,0 +1,44 @@
+
+ * @gitea Joomla Component Builder
+ * @github 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(
+ 'note_how_to_clone',
+ 'clone_me'
+);
+
+$hiddenFields = $displayData->get('hidden_fields') ?: array();
+
+?>
+
+
+
+ setFieldAttribute($field, 'type', 'hidden'); ?>
+
+ renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
+
diff --git a/admin/layouts/component_placeholders/clone_left.php b/admin/layouts/component_placeholders/clone_left.php
new file mode 100644
index 000000000..d240e31d2
--- /dev/null
+++ b/admin/layouts/component_placeholders/clone_left.php
@@ -0,0 +1,44 @@
+
+ * @gitea Joomla Component Builder
+ * @github 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(
+ 'note_how_to_clone',
+ 'clone_me'
+);
+
+$hiddenFields = $displayData->get('hidden_fields') ?: array();
+
+?>
+
+
+
+ setFieldAttribute($field, 'type', 'hidden'); ?>
+
+ renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
+
diff --git a/admin/layouts/component_plugins/clone_left.php b/admin/layouts/component_plugins/clone_left.php
new file mode 100644
index 000000000..d240e31d2
--- /dev/null
+++ b/admin/layouts/component_plugins/clone_left.php
@@ -0,0 +1,44 @@
+
+ * @gitea Joomla Component Builder
+ * @github 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(
+ 'note_how_to_clone',
+ 'clone_me'
+);
+
+$hiddenFields = $displayData->get('hidden_fields') ?: array();
+
+?>
+
+
+
+ setFieldAttribute($field, 'type', 'hidden'); ?>
+
+ renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
+
+
diff --git a/admin/models/component_dashboard.php b/admin/models/component_dashboard.php
index a765e57eb..d7e2372d8 100644
--- a/admin/models/component_dashboard.php
+++ b/admin/models/component_dashboard.php
@@ -31,12 +31,18 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
'dashboard' => array(
'fullwidth' => array(
'note_php_dashboard_note',
- 'php_dashboard_methods',
- 'dashboard_tab'
+ 'dashboard_tab',
+ 'php_dashboard_methods'
),
'above' => array(
'joomla_component'
)
+ ),
+ 'clone' => array(
+ 'left' => array(
+ 'note_how_to_clone',
+ 'clone_me'
+ )
)
);
@@ -927,6 +933,19 @@ class ComponentbuilderModelComponent_dashboard extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
+
+ // check if we have a clone moment
+ if (isset($data['clone_me']) && $data['clone_me'] > 0)
+ {
+ // get the following data from clone_me (component_dashboard)
+ $keys = array('php_dashboard_methods','dashboard_tab','params');
+ foreach ($keys as $key)
+ {
+ $data[$key] = ComponentbuilderHelper::getVar('component_dashboard', $data['clone_me'], 'joomla_component', $key);
+ }
+ }
+
+
// Set the dashboard_tab items to data.
if (isset($data['dashboard_tab']) && is_array($data['dashboard_tab']))
{
diff --git a/admin/models/component_files_folders.php b/admin/models/component_files_folders.php
index aca5ac366..85a385443 100644
--- a/admin/models/component_files_folders.php
+++ b/admin/models/component_files_folders.php
@@ -39,6 +39,12 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
'joomla_component'
)
),
+ 'clone' => array(
+ 'left' => array(
+ 'note_how_to_clone',
+ 'clone_me'
+ )
+ ),
'advance' => array(
'fullwidth' => array(
'note_add_files_fullpath',
@@ -872,6 +878,19 @@ class ComponentbuilderModelComponent_files_folders extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
+
+ // check if we have a clone moment
+ if (isset($data['clone_me']) && $data['clone_me'] > 0)
+ {
+ // get the following data from clone_me (component_files_folders)
+ $keys = array('addfiles','addfolders','addfilesfullpath','addfoldersfullpath');
+ foreach ($keys as $key)
+ {
+ $data[$key] = ComponentbuilderHelper::getVar('component_files_folders', $data['clone_me'], 'joomla_component', $key);
+ }
+ }
+
+
// Set the addfoldersfullpath items to data.
if (isset($data['addfoldersfullpath']) && is_array($data['addfoldersfullpath']))
{
diff --git a/admin/models/component_modules.php b/admin/models/component_modules.php
index c8ac01b17..b5d099cbc 100644
--- a/admin/models/component_modules.php
+++ b/admin/models/component_modules.php
@@ -36,6 +36,12 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin
'above' => array(
'joomla_component'
)
+ ),
+ 'clone' => array(
+ 'left' => array(
+ 'note_how_to_clone',
+ 'clone_me'
+ )
)
);
@@ -805,6 +811,15 @@ class ComponentbuilderModelComponent_modules extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
+
+ // check if we have a clone moment
+ if (isset($data['clone_me']) && $data['clone_me'] > 0)
+ {
+ // get addjoomla_modules data from clone_me (component_modules)
+ $data['addjoomla_modules'] = ComponentbuilderHelper::getVar('component_modules', $data['clone_me'], 'joomla_component', 'addjoomla_modules');
+ }
+
+
// Set the addjoomla_modules items to data.
if (isset($data['addjoomla_modules']) && is_array($data['addjoomla_modules']))
{
diff --git a/admin/models/component_placeholders.php b/admin/models/component_placeholders.php
index 71c3129e8..d373a4914 100644
--- a/admin/models/component_placeholders.php
+++ b/admin/models/component_placeholders.php
@@ -35,6 +35,12 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin
'above' => array(
'joomla_component'
)
+ ),
+ 'clone' => array(
+ 'left' => array(
+ 'note_how_to_clone',
+ 'clone_me'
+ )
)
);
@@ -804,6 +810,15 @@ class ComponentbuilderModelComponent_placeholders extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
+
+ // check if we have a clone moment
+ if (isset($data['clone_me']) && $data['clone_me'] > 0)
+ {
+ // get addplaceholders data from clone_me (component_placeholders)
+ $data['addplaceholders'] = ComponentbuilderHelper::getVar('component_placeholders', $data['clone_me'], 'joomla_component', 'addplaceholders');
+ }
+
+
// Set the addplaceholders items to data.
if (isset($data['addplaceholders']) && is_array($data['addplaceholders']))
{
diff --git a/admin/models/component_plugins.php b/admin/models/component_plugins.php
index 127ff9c81..47815e893 100644
--- a/admin/models/component_plugins.php
+++ b/admin/models/component_plugins.php
@@ -36,6 +36,12 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin
'above' => array(
'joomla_component'
)
+ ),
+ 'clone' => array(
+ 'left' => array(
+ 'note_how_to_clone',
+ 'clone_me'
+ )
)
);
@@ -805,6 +811,15 @@ class ComponentbuilderModelComponent_plugins extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
+
+ // check if we have a clone moment
+ if (isset($data['clone_me']) && $data['clone_me'] > 0)
+ {
+ // get addjoomla_plugins data from clone_me (component_plugins)
+ $data['addjoomla_plugins'] = ComponentbuilderHelper::getVar('component_plugins', $data['clone_me'], 'joomla_component', 'addjoomla_plugins');
+ }
+
+
// Set the addjoomla_plugins items to data.
if (isset($data['addjoomla_plugins']) && is_array($data['addjoomla_plugins']))
{
diff --git a/admin/models/forms/component_dashboard.xml b/admin/models/forms/component_dashboard.xml
index 2ec57e443..78160c848 100644
--- a/admin/models/forms/component_dashboard.xml
+++ b/admin/models/forms/component_dashboard.xml
@@ -105,19 +105,19 @@
readonly="true"
button="false"
/>
-
+
+
+
+
+
diff --git a/admin/models/forms/component_files_folders.xml b/admin/models/forms/component_files_folders.xml
index 2bbe8c6b3..d12e64442 100644
--- a/admin/models/forms/component_files_folders.xml
+++ b/admin/models/forms/component_files_folders.xml
@@ -105,6 +105,19 @@
readonly="true"
button="false"
/>
+
+
+
+
diff --git a/admin/models/forms/component_modules.xml b/admin/models/forms/component_modules.xml
index 80f15ca94..1ba103160 100644
--- a/admin/models/forms/component_modules.xml
+++ b/admin/models/forms/component_modules.xml
@@ -105,6 +105,19 @@
readonly="true"
button="false"
/>
+
+
+
+
+
+
+
+
+
+
+
+