Added Events to Compiler, the beginning of an API. #435

Merged
Llewellyn merged 26 commits from staging into master 2019-07-06 22:38:13 +00:00
425 changed files with 12114 additions and 6416 deletions

View File

@ -12,7 +12,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 safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.18) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.21) 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)
@ -146,13 +146,13 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 15th May, 2019
+ *Version*: 2.9.18
+ *Last Build*: 6th July, 2019
+ *Version*: 2.9.21
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **206359**
+ *Field count*: **1136**
+ *File count*: **1344**
+ *Line count*: **211603**
+ *Field count*: **1143**
+ *File count*: **1346**
+ *Folder count*: **209**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).

View File

@ -12,7 +12,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 safe you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.18) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.9.21) 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)
@ -146,13 +146,13 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 15th May, 2019
+ *Version*: 2.9.18
+ *Last Build*: 6th July, 2019
+ *Version*: 2.9.21
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **206359**
+ *Field count*: **1136**
+ *File count*: **1344**
+ *Line count*: **211603**
+ *Field count*: **1143**
+ *File count*: **1346**
+ *Folder count*: **209**
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).

View File

@ -496,38 +496,42 @@ abstract class ###Component###Helper
/**
* Get any component's model
**/
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = '###Component###', $config = array())
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = '###Component###', $config = array())
{
// fix the name
$name = self::safeString($name);
// full path
$fullPath = $path . '/models';
// set prefix
$prefix = $component.'Model';
// full path to models
$fullPathModels = $path . '/models';
// load the model file
JModelLegacy::addIncludePath($fullPath, $prefix);
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
// make sure the table path is loaded
if (!isset($config['table_path']) || !self::checkString($config['table_path']))
{
// This is the JCB default path to tables in Joomla 3.x
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
}
// get instance
$model = JModelLegacy::getInstance($name, $prefix, $config);
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
// if model not found (strange)
if ($model == false)
{
jimport('joomla.filesystem.file');
// get file path
$filePath = $path . '/' . $name . '.php';
$fullPath = $fullPath.'/'.$name.'.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (JFile::exists($filePath))
{
// get the file
require_once $filePath;
}
elseif (JFile::exists($fullPath))
elseif (JFile::exists($fullPathModel))
{
// get the file
require_once $fullPath;
require_once $fullPathModel;
}
// build class names
$modelClass = $prefix.$name;
$modelClass = $Component . 'Model' . $name;
if (class_exists($modelClass))
{
// initialize the model

View File

@ -139,38 +139,42 @@ abstract class ###Component###Helper
/**
* Get any component's model
**/
public static function getModel($name, $path = JPATH_COMPONENT_SITE, $component = '###Component###', $config = array())
public static function getModel($name, $path = JPATH_COMPONENT_SITE, $Component = '###Component###', $config = array())
{
// fix the name
$name = self::safeString($name);
// full path
$fullPath = $path . '/models';
// set prefix
$prefix = $component.'Model';
// full path to models
$fullPathModels = $path . '/models';
// load the model file
JModelLegacy::addIncludePath($fullPath, $prefix);
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
// make sure the table path is loaded
if (!isset($config['table_path']) || !self::checkString($config['table_path']))
{
// This is the JCB default path to tables in Joomla 3.x
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
}
// get instance
$model = JModelLegacy::getInstance($name, $prefix, $config);
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
// if model not found (strange)
if ($model == false)
{
jimport('joomla.filesystem.file');
// get file path
$filePath = $path . '/' . $name . '.php';
$fullPath = $fullPath.'/'.$name.'.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (JFile::exists($filePath))
{
// get the file
require_once $filePath;
}
elseif (JFile::exists($fullPath))
elseif (JFile::exists($fullPathModel))
{
// get the file
require_once $fullPath;
require_once $fullPathModel;
}
// build class names
$modelClass = $prefix.$name;
$modelClass = $Component . 'Model' . $name;
if (class_exists($modelClass))
{
// initialize the model

View File

@ -141,7 +141,7 @@ class ###Component###Controller###View### extends JControllerForm
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$return = $this->input->get('return', null, 'base64');###JCONTROLLERFORM_BEFORECANCEL###
$cancel = parent::cancel($key);
@ -177,7 +177,7 @@ class ###Component###Controller###View### extends JControllerForm
'index.php?option=' . $this->option . $redirect, false
)
);
}
}###JCONTROLLERFORM_AFTERCANCEL###
return $cancel;
}

View File

@ -42,7 +42,7 @@ class ###Component###Controller###View### extends JControllerForm
{
$this->view_list = '###SITE_DEFAULT_VIEW###'; // safeguard for setting the return view listing to the default site view.
parent::__construct($config);
}
}###ADMIN_CUSTOM_BUTTONS_CONTROLLER###
/**
* Method override to check if you can add a new record.
@ -141,7 +141,7 @@ class ###Component###Controller###View### extends JControllerForm
$this->refid = $this->input->get('refid', 0, 'int');
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$return = $this->input->get('return', null, 'base64');###JCONTROLLERFORM_BEFORECANCEL###
$cancel = parent::cancel($key);
@ -177,7 +177,7 @@ class ###Component###Controller###View### extends JControllerForm
'index.php?option=' . $this->option . $redirect, false
)
);
}
}###JCONTROLLERFORM_AFTERCANCEL###
return $cancel;
}

View File

@ -24,6 +24,13 @@ use Joomla\Registry\Registry;
*/
class ###Component###Model###View### extends JModelAdmin
{
/**
* The tab layout fields array.
*
* @var array
*/
protected $tabLayoutFields = ###TABLAYOUTFIELDSARRAY###;
/**
* @var string The prefix to use with controller messages.
* @since 1.6

View File

@ -24,6 +24,13 @@ use Joomla\Registry\Registry;
*/
class ###Component###Model###View### extends JModelAdmin
{
/**
* The tab layout fields array.
*
* @var array
*/
protected $tabLayoutFields = ###TABLAYOUTFIELDSARRAY###;
/**
* @var string The prefix to use with controller messages.
* @since 1.6

View File

@ -29,18 +29,31 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
###LAYOUTITEMS###
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -17,15 +17,27 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
###LAYOUTITEMS###
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -34,3 +46,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -17,18 +17,31 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
###LAYOUTITEMS###
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -17,18 +17,31 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
###LAYOUTITEMS###
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -17,15 +17,27 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
###LAYOUTITEMS###
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -34,3 +46,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -143,6 +143,8 @@ class ###Component###Router extends JComponentRouterBase
{
$getTable = '#__categories';
$query->from($db->quoteName($getTable));
// we need this to target the components categories (TODO will keep an eye on this)
$query->where($db->quoteName('extension') . ' LIKE '. $db->quote((string)'com_' . $main . '%'));
}
else
{

View File

@ -57,6 +57,16 @@
folder="editors"
filter="cmd"
/>
<!-- Compiler_plugin Field. Type: Plugins. (joomla) -->
<field
type="plugins"
name="compiler_plugin"
label="COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_DESCRIPTION"
multiple="true"
folder="extension"
filter="cmd"
/>
<!-- Spacer_hr_one Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_one" hr="true" class="spacer_hr_one" />
<!-- Manage_jcb_package_directories Field. Type: Radio. (joomla) -->
@ -239,6 +249,20 @@
<option value="2">
COM_COMPONENTBUILDER_CONFIG_SIMPLEXMLELEMENT_CLASS</option>
</field>
<!-- Field_name_builder Field. Type: Radio. (joomla) -->
<field
type="radio"
name="field_name_builder"
label="COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_DESCRIPTION"
class="btn-group btn-group-yesno"
default="1">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_DEFAULT</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC</option>
</field>
<!-- Spacer_hr_seven Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr_seven" hr="true" class="spacer_hr_seven" />
<!-- Api Field. Type: User. (joomla) -->
@ -711,16 +735,29 @@
class="list_class"
multiple="false"
default="0"
required="false"
button="false"
/>
<!-- Install Field. Type: List. (joomla) -->
<field
type="list"
name="install"
label="COM_COMPONENTBUILDER_CONFIG_INSTALL_LABEL"
description="COM_COMPONENTBUILDER_CONFIG_INSTALL_DESCRIPTION"
class="list_class"
multiple="false"
default="1">
<!-- Option Set. -->
<option value="1">
COM_COMPONENTBUILDER_CONFIG_TRUE</option>
<option value="2">
COM_COMPONENTBUILDER_CONFIG_FALSE</option>
</field>
<!-- Backup Field. Type: Checkbox. (joomla) -->
<field
type="checkbox"
name="backup"
label="COM_COMPONENTBUILDER_CONFIG_BACKUP_LABEL"
value="1"
required="false"
description="COM_COMPONENTBUILDER_CONFIG_BACKUP_DESCRIPTION"
class="inputbox"
/>
@ -730,7 +767,6 @@
name="repository"
label="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_LABEL"
value="1"
required="false"
description="COM_COMPONENTBUILDER_CONFIG_REPOSITORY_DESCRIPTION"
class="inputbox"
/>
@ -741,7 +777,6 @@
label="COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_LABEL"
value="1"
default=""
required="false"
description="COM_COMPONENTBUILDER_CONFIG_PLACEHOLDERS_DESCRIPTION"
class="inputbox"
/>
@ -843,7 +878,6 @@
class="text_area"
readonly="false"
disabled="false"
required="true"
filter="STRING"
message="COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_MESSAGE"
hint="COM_COMPONENTBUILDER_CONFIG_BACKUP_PACKAGE_NAME_HINT"

View File

@ -121,7 +121,7 @@ class ComponentbuilderControllerAdmin_views extends JControllerAdmin
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
if($user->authorise('admin_views.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');

View File

@ -216,7 +216,7 @@ class ComponentbuilderControllerCompiler extends JControllerAdmin
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=compiler', false);
$message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER');
if($user->authorise('core.admin', 'com_componentbuilder'))
if($user->authorise('compiler.clear_tmp', 'com_componentbuilder') && $user->authorise('core.options', 'com_componentbuilder'))
{
// get the model
$model = $this->getModel('compiler');

View File

@ -121,7 +121,7 @@ class ComponentbuilderControllerCustom_codes extends JControllerAdmin
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
if($user->authorise('custom_codes.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');

View File

@ -121,7 +121,7 @@ class ComponentbuilderControllerDynamic_gets extends JControllerAdmin
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
if($user->authorise('dynamic_gets.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');

View File

@ -121,7 +121,7 @@ class ComponentbuilderControllerFields extends JControllerAdmin
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
if($user->authorise('fields.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');

View File

@ -45,7 +45,7 @@ class ComponentbuilderControllerJoomla_component extends JControllerForm
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('joomla_component.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
if ($user->authorise('joomla_component.import_jcb_packages', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
{
$session = JFactory::getSession();
$session->set('backto_VDM_IMPORT', 'joomla_components');

View File

@ -121,7 +121,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
// set massage
$message = JText::_('COM_COMPONENTBUILDER_YOU_DO_NOT_HAVE_PERMISSION_TO_RUN_THE_EXPANSION_MODULE');
// check if this user has the right to run expansion
if($user->authorise('compiler.run_expansion', 'com_componentbuilder'))
if($user->authorise('joomla_components.run_expansion', 'com_componentbuilder'))
{
// set massage
$message = JText::_('COM_COMPONENTBUILDER_EXPANSION_FAILED_PLEASE_CHECK_YOUR_SETTINGS_IN_THE_GLOBAL_OPTIONS_OF_JCB_UNDER_THE_DEVELOPMENT_METHOD_TAB');
@ -159,7 +159,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
// set page redirect
$redirect_url = JRoute::_('index.php?option=com_componentbuilder&view=joomla_components', false);
$message = JText::_('COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER');
if($user->authorise('core.admin', 'com_componentbuilder'))
if($user->authorise('joomla_components.clear_tmp', 'com_componentbuilder') && $user->authorise('core.options', 'com_componentbuilder'))
{
// get the model
$model = $this->getModel('compiler');
@ -181,7 +181,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
{
// check if import is allowed for this user.
$user = JFactory::getUser();
if ($user->authorise('joomla_component.import', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
if ($user->authorise('joomla_component.import_jcb_packages', 'com_componentbuilder') && $user->authorise('core.import', 'com_componentbuilder'))
{
$session = JFactory::getSession();
$session->set('backto_VDM_IMPORT', 'joomla_components');
@ -205,7 +205,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
$model = $this->getModel('Joomla_components');
// check if export is allowed for this user.
$model->user = JFactory::getUser();
if ($model->user->authorise('joomla_component.export', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder'))
if ($model->user->authorise('joomla_component.export_jcb_packages', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder'))
{
// Get the input
$input = JFactory::getApplication()->input;
@ -289,7 +289,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
// make sure to set active type (adding this script from custom code :)
$model->activeType = 'manualBackup';
// check if export is allowed for this user. (we need this sorry)
if ($model->user->authorise('joomla_component.export', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder'))
if ($model->user->authorise('joomla_component.export_jcb_packages', 'com_componentbuilder') && $model->user->authorise('core.export', 'com_componentbuilder'))
{
// get all component IDs to backup
$pks = componentbuilderHelper::getComponentIDs();
@ -443,7 +443,7 @@ class ComponentbuilderControllerJoomla_components extends JControllerAdmin
$model = $this->getModel('Joomla_components');
// check if export is allowed for this user.
$model->user = JFactory::getUser();
if ($model->user->authorise('joomla_component.cloner', 'com_componentbuilder') && $model->user->authorise('core.copy', 'com_componentbuilder'))
if ($model->user->authorise('joomla_component.clone', 'com_componentbuilder') && $model->user->authorise('core.copy', 'com_componentbuilder'))
{
// Get the input
$input = JFactory::getApplication()->input;

View File

@ -253,6 +253,8 @@ class Compiler extends Infusion
*/
protected function setFileContent(&$name, &$path, &$bom, $view = null)
{
// Trigger Event: jcb_ce_onBeforeSetFileContent
$this->triggerEvent('jcb_ce_onBeforeSetFileContent', array(&$this->componentContext, &$name, &$path, &$bom, &$view));
// set the file name
$this->fileContentStatic[$this->hhh . 'FILENAME' . $this->hhh] = $name;
// check if the file should get PHP opening
@ -263,6 +265,8 @@ class Compiler extends Infusion
}
// get content of the file
$string = ComponentbuilderHelper::getFileContents($path);
// Trigger Event: jcb_ce_onGetFileContents
$this->triggerEvent('jcb_ce_onGetFileContents', array(&$this->componentContext, &$string, &$name, &$path, &$bom, &$view));
// see if we should add a BOM
if (strpos($string, $this->hhh . 'BOM' . $this->hhh) !== false)
{
@ -281,6 +285,8 @@ class Compiler extends Infusion
{
$answer = $this->setDynamicValues($answer);
}
// Trigger Event: jcb_ce_onBeforeSetFileContent
$this->triggerEvent('jcb_ce_onBeforeWriteFileContent', array(&$this->componentContext, &$answer, &$name, &$path, &$bom, &$view));
// add answer back to file
$this->writeFile($path, $answer);
// count the file lines
@ -453,20 +459,28 @@ class Compiler extends Infusion
{
// set the repo path
$repoFullPath = $this->repoPath . '/com_' . $this->componentData->sales_name . '__joomla_' . $this->joomlaVersion;
// Trigger Event: jcb_ce_onBeforeUpdateRepo
$this->triggerEvent('jcb_ce_onBeforeUpdateRepo', array(&$this->componentContext, &$this->componentPath, &$repoFullPath, &$this->componentData));
// remove old data
$this->removeFolder($repoFullPath, $this->componentData->toignore);
// set the new data
JFolder::copy($this->componentPath, $repoFullPath, '', true);
// Trigger Event: jcb_ce_onAfterUpdateRepo
$this->triggerEvent('jcb_ce_onAfterUpdateRepo', array(&$this->componentContext, &$this->componentPath, &$repoFullPath, &$this->componentData));
}
// the name of the zip file to create
$this->filepath = $this->tempPath . '/' . $this->componentFolderName . '.zip';
// Trigger Event: jcb_ce_onBeforeZipComponent
$this->triggerEvent('jcb_ce_onBeforeZipComponent', array(&$this->componentContext, &$this->componentPath, &$this->filepath, &$this->tempPath, &$this->componentFolderName, &$this->componentData));
//create the zip file
if (ComponentbuilderHelper::zip($this->componentPath, $this->filepath))
{
// now move to backup if zip was made and backup is requered
// now move to backup if zip was made and backup is required
if ($this->backupPath && $this->dynamicIntegration)
{
// Trigger Event: jcb_ce_onBeforeBackupZip
$this->triggerEvent('jcb_ce_onBeforeBackupZip', array(&$this->componentContext, &$this->filepath, &$this->tempPath, &$this->backupPath, &$this->componentData));
// copy the zip to backup path
JFile::copy($this->filepath, $this->backupPath);
}
@ -476,10 +490,14 @@ class Compiler extends Infusion
// make sure we have the correct file
if (isset($this->componentData->sales_server))
{
// Trigger Event: jcb_ce_onBeforeMoveToServer
$this->triggerEvent('jcb_ce_onBeforeMoveToServer', array(&$this->componentContext, &$this->filepath, &$this->tempPath, &$this->componentSalesName, &$this->componentData));
// move to server
ComponentbuilderHelper::moveToServer($this->filepath, $this->componentSalesName . '.zip', (int) $this->componentData->sales_server, $this->componentData->sales_server_protocol);
}
}
// Trigger Event: jcb_ce_onAfterZipComponent
$this->triggerEvent('jcb_ce_onAfterZipComponent', array(&$this->componentContext, &$this->filepath, &$this->tempPath, &$this->componentFolderName, &$this->componentData));
// remove the component folder since we are done
if ($this->removeFolder($this->componentPath))
{

View File

@ -736,6 +736,13 @@ class Get
*/
public $mysqlTableSetting = array();
/**
* event plugin trigger switch
*
* @var boolean
*/
protected $active_plugins = false;
/**
* Constructor
*/
@ -748,6 +755,21 @@ class Get
$this->app = JFactory::getApplication();
// Set the params
$this->params = JComponentHelper::getParams('com_componentbuilder');
// get active plugins
if (($plugins = $this->params->get('compiler_plugin', false)) !== false)
{
foreach ($plugins as $plugin)
{
// get posible plugins
if (\JPluginHelper::isEnabled('extension', $plugin))
{
// Import the appropriate plugin group.
\JPluginHelper::importPlugin('extension', $plugin);
// activate events
$this->active_plugins = true;
}
}
}
// set the minfy switch of the JavaScript
$this->minify = (isset($config['minify']) && $config['minify'] != 2) ? $config['minify'] : $this->params->get('minify', 0);
// set the global language
@ -778,6 +800,8 @@ class Get
$this->langPrefix = 'COM_' . ComponentbuilderHelper::safeString($name_code, 'U');
// set component code name
$this->componentCodeName = ComponentbuilderHelper::safeString($name_code);
// set component context
$this->componentContext = $this->componentCodeName . '.' . $this->componentID;
// set if placeholders should be added to customcode
$global = ((int) ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'add_placeholders') == 1) ? true : false;
$this->addPlaceholders = ((int) $config['placeholders'] == 0) ? false : (((int) $config['placeholders'] == 1) ? true : $global);
@ -866,6 +890,40 @@ class Get
return '';
}
/**
* Trigger events
*
* @param string $event The event to trigger
* @param mix $data The values to pass to the event/plugin
*
* @return string
*
*/
public function triggerEvent($event, $data)
{
// only exicute if plugins were loaded (active)
if ($this->active_plugins)
{
// Get the dispatcher.
$dispatcher = \JEventDispatcher::getInstance();
// Trigger this compiler event.
$results = $dispatcher->trigger($event, $data);
// Check for errors encountered while trigger the event
if (count($results) && in_array(false, $results, true))
{
// Get the last error.
$error = $dispatcher->getError();
if (!($error instanceof \Exception))
{
throw new \Exception($error);
}
}
}
}
/**
* get all System Placeholders
*
@ -963,12 +1021,18 @@ class Get
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_component_placeholders', 'k') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('k.joomla_component') . ')');
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $this->componentID);
// Trigger Event: jcb_ce_onBeforeQueryComponentData
$this->triggerEvent('jcb_ce_onBeforeQueryComponentData', array(&$this->componentContext, &$this->componentID, &$query, &$this->db));
// Reset the query using our newly populated query object.
$this->db->setQuery($query);
// Load the results as a list of stdClass objects
$component = $this->db->loadObject();
// Trigger Event: jcb_ce_onBeforeModelComponentData
$this->triggerEvent('jcb_ce_onBeforeModelComponentData', array(&$this->componentContext, &$component));
// set upater
$updater = array(
'unique' => array(
@ -1510,10 +1574,36 @@ class Get
$component->toignore = array('.git');
}
// Trigger Event: jcb_ce_onAfterModelComponentData
$this->triggerEvent('jcb_ce_onAfterModelComponentData', array(&$this->componentContext, &$component));
// return the found component data
return $component;
}
/**
* set the language content values to language content array
*
* @param string $target The target area for the language string
* @param string $language The language key string
* @param string $string The language string
* @param boolean $addPrefix The switch to add langPrefix
*
* @return void
*
*/
public function setLangContent($target, $language, $string, $addPrefix = false)
{
if ($addPrefix && !isset($this->langContent[$target][$this->langPrefix . '_' . $language]))
{
$this->langContent[$target][$this->langPrefix . '_' . $language] = trim($string);
}
elseif (!isset($this->langContent[$target][$language]))
{
$this->langContent[$target][$language] = trim($string);
}
}
/**
* Get all Admin View Data
*
@ -1556,6 +1646,9 @@ class Get
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_admin_custom_tabs', 't') . ' ON (' . $this->db->quoteName('a.id') . ' = ' . $this->db->quoteName('t.admin_view') . ')');
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
// Trigger Event: jcb_ce_onBeforeQueryViewData
$this->triggerEvent('jcb_ce_onBeforeQueryViewData', array(&$this->componentContext, &$id, &$query, &$this->db));
// Reset the query using our newly populated query object.
$this->db->setQuery($query);
@ -1611,6 +1704,10 @@ class Get
$this->placeholders[$this->bbb . 'Views' . $this->ddd] = $this->placeholders[$this->hhh . 'Views' . $this->hhh];
$this->placeholders[$this->bbb . 'VIEW' . $this->ddd] = $this->placeholders[$this->hhh . 'VIEW' . $this->hhh];
$this->placeholders[$this->bbb . 'VIEWS' . $this->ddd] = $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh];
// Trigger Event: jcb_ce_onBeforeModelViewData
$this->triggerEvent('jcb_ce_onBeforeModelViewData', array(&$this->componentContext, &$view, &$this->placeholders));
// add the tables
$view->addtables = (isset($view->addtables) && ComponentbuilderHelper::checkJson($view->addtables)) ? json_decode($view->addtables, true) : null;
if (ComponentbuilderHelper::checkArray($view->addtables))
@ -1634,7 +1731,7 @@ class Get
$tab['name'] = (isset($tab['name']) && ComponentbuilderHelper::checkString($tab['name'])) ? $tab['name'] : 'Tab';
// set lang
$tab['lang'] = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($tab['view'], 'U') . '_' . ComponentbuilderHelper::safeString($tab['name'], 'U');
$this->langContent['both'][$tab['lang']] = trim($tab['name']);
$this->setLangContent('both', $tab['lang'], $tab['name']);
// set code name
$tab['code'] = ComponentbuilderHelper::safeString($tab['name']);
// check if the permissions for the tab should be added
@ -1673,8 +1770,8 @@ class Get
$tab['lang_permission'] = $tab['lang'] . '_TAB_PERMISSION';
$tab['lang_permission_desc'] = $tab['lang'] . '_TAB_PERMISSION_DESC';
$tab['lang_permission_title'] = $this->placeholders[$this->hhh . 'Views' . $this->hhh] . ' View ' . $tab['name'] . ' Tab';
$this->langContent['both'][$tab['lang_permission']] = $tab['lang_permission_title'];
$this->langContent['both'][$tab['lang_permission_desc']] = 'Allow the users in this group to view ' . $tab['name'] . ' Tab of ' . $this->placeholders[$this->hhh . 'views' . $this->hhh];
$this->setLangContent('both', $tab['lang_permission'], $tab['lang_permission_title']);
$this->setLangContent('both', $tab['lang_permission_desc'], 'Allow the users in this group to view ' . $tab['name'] . ' Tab of ' . $this->placeholders[$this->hhh . 'views' . $this->hhh]);
// set the sort key
$tab['sortKey'] = ComponentbuilderHelper::safeString($tab['lang_permission_title']);
}
@ -1962,7 +2059,7 @@ class Get
if ('default' !== $check_column_name)
{
$column_name_lang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($name_list, 'U') . '_' . ComponentbuilderHelper::safeString($relationsValue['column_name'], 'U');
$this->langContent['admin'][$column_name_lang] = trim($relationsValue['column_name']);
$this->setLangContent('admin', $column_name_lang, $relationsValue['column_name']);
$this->listHeadOverRide[$name_list][(int) $relationsValue['listfield']] = $column_name_lang;
}
}
@ -2046,7 +2143,7 @@ class Get
}
}
// add_php
$addArrayP = array('php_getitem', 'php_before_save', 'php_save', 'php_getform', 'php_postsavehook', 'php_getitems', 'php_getitems_after_all', 'php_getlistquery', 'php_allowadd', 'php_allowedit', 'php_before_delete', 'php_after_delete', 'php_before_publish', 'php_after_publish', 'php_batchcopy', 'php_batchmove', 'php_document');
$addArrayP = array('php_getitem', 'php_before_save', 'php_save', 'php_getform', 'php_postsavehook', 'php_getitems', 'php_getitems_after_all', 'php_getlistquery', 'php_allowadd', 'php_allowedit', 'php_before_cancel', 'php_after_cancel', 'php_before_delete', 'php_after_delete', 'php_before_publish', 'php_after_publish', 'php_batchcopy', 'php_batchmove', 'php_document');
foreach ($addArrayP as $scripter)
{
if (isset($view->{'add_' . $scripter}) && $view->{'add_' . $scripter} == 1)
@ -2205,6 +2302,10 @@ class Get
// remove the table values since we moved to another object
unset($view->{'mysql_table_' . $_mysqlTableKey});
}
// Trigger Event: jcb_ce_onAfterModelViewData
$this->triggerEvent('jcb_ce_onAfterModelViewData', array(&$this->componentContext, &$view, &$this->placeholders));
// clear placeholders
unset($this->placeholders[$this->hhh . 'view' . $this->hhh]);
unset($this->placeholders[$this->hhh . 'views' . $this->hhh]);
@ -2244,11 +2345,18 @@ class Get
$query->from('#__componentbuilder_' . $table . ' AS a');
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
// Trigger Event: jcb_ce_onBeforeQueryCustomViewData
$this->triggerEvent('jcb_ce_onBeforeQueryCustomViewData', array(&$this->componentContext, &$id, &$table, &$query, &$this->db));
// Reset the query using our newly populated query object.
$this->db->setQuery($query);
// Load the results as a list of stdClass objects (see later for more options on retrieving data).
$view = $this->db->loadObject();
// Trigger Event: jcb_ce_onBeforeModelCustomViewData
$this->triggerEvent('jcb_ce_onBeforeModelCustomViewData', array(&$this->componentContext, &$view, &$id, &$table));
if ($table === 'site_view')
{
$this->lang = 'site';
@ -2485,6 +2593,10 @@ class Get
}
unset($view->custom_button);
}
// Trigger Event: jcb_ce_onAfterModelCustomViewData
$this->triggerEvent('jcb_ce_onAfterModelCustomViewData', array(&$this->componentContext, &$view));
// return the found view data
return $view;
}
@ -2513,6 +2625,9 @@ class Get
$query->join('LEFT', $this->db->quoteName('#__componentbuilder_fieldtype', 'c') . ' ON (' . $this->db->quoteName('a.fieldtype') . ' = ' . $this->db->quoteName('c.id') . ')');
$query->where($this->db->quoteName('a.id') . ' = ' . $this->db->quote($id));
// Trigger Event: jcb_ce_onBeforeQueryFieldData
$this->triggerEvent('jcb_ce_onBeforeQueryFieldData', array(&$this->componentContext, &$id, &$query, &$this->db));
// Reset the query using our newly populated query object.
$this->db->setQuery($query);
$this->db->execute();
@ -2521,6 +2636,9 @@ class Get
// Load the results as a list of stdClass objects (see later for more options on retrieving data).
$field = $this->db->loadObject();
// Trigger Event: jcb_ce_onBeforeModelFieldData
$this->triggerEvent('jcb_ce_onBeforeModelFieldData', array(&$this->componentContext, &$field));
// adding a fix for the changed name of type to fieldtype
$field->type = $field->fieldtype;
@ -2596,6 +2714,9 @@ class Get
// get the last used version
$field->history = $this->getHistoryWatch('field', $id);
// Trigger Event: jcb_ce_onAfterModelFieldData
$this->triggerEvent('jcb_ce_onAfterModelFieldData', array(&$this->componentContext, &$field));
$this->_fieldData[$id] = $field;
}
else
@ -2854,7 +2975,7 @@ class Get
*
* @param object $field The field object
* @param string $listViewName The list view name
* @param string $amicably The peaceful resolve
* @param string $amicably The peaceful resolve (for fields in subforms in same view :)
*
* @return string Success returns field name
*
@ -2872,9 +2993,9 @@ class Get
return 'error';
}
// set the type name
$type_name = ComponentbuilderHelper::safeString($field['settings']->type_name);
$type_name = ComponentbuilderHelper::safeFieldName($field['settings']->type_name);
// set the name of the field
$name = ComponentbuilderHelper::safeString($field['settings']->name);
$name = ComponentbuilderHelper::safeFieldName($field['settings']->name);
// check that we have the poperties
if (ComponentbuilderHelper::checkArray($field['settings']->properties))
{
@ -2900,13 +3021,15 @@ class Get
if (ComponentbuilderHelper::checkString($listViewName))
{
// check if we should use another Text Name as this views name
$otherName = ComponentbuilderHelper::getBetween($field['settings']->xml, 'othername="', '"');
$otherViews = ComponentbuilderHelper::getBetween($field['settings']->xml, 'views="', '"');
$otherView = ComponentbuilderHelper::getBetween($field['settings']->xml, 'view="', '"');
$otherName = $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'othername="', '"'), $this->placeholders);
$otherViews = $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'views="', '"'), $this->placeholders);
$otherView = $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'view="', '"'), $this->placeholders);
// This is to link other view category
if (ComponentbuilderHelper::checkString($otherName) && ComponentbuilderHelper::checkString($otherViews) && ComponentbuilderHelper::checkString($otherView))
{
// set other category details
$this->catOtherName[$listViewName] = array(
'name' => ComponentbuilderHelper::safeString($otherName),
'name' => ComponentbuilderHelper::safeFieldName($otherName),
'views' => ComponentbuilderHelper::safeString($otherViews),
'view' => ComponentbuilderHelper::safeString($otherView)
);
@ -2926,7 +3049,7 @@ class Get
else
{
// get value from xml
$xml = ComponentbuilderHelper::safeString($this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'name="', '"'), $this->placeholders));
$xml = ComponentbuilderHelper::safeFieldName($this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'name="', '"'), $this->placeholders));
// check if a value was found
if (ComponentbuilderHelper::checkString($xml))
{
@ -2992,13 +3115,13 @@ class Get
{
$counter = 1;
// set the unique name
$uniqueName = ComponentbuilderHelper::safeString($name . '_' . $counter);
$uniqueName = ComponentbuilderHelper::safeFieldName($name . '_' . $counter);
while (isset($this->uniqueNames[$view]['names'][$uniqueName]))
{
// increment the number
$counter++;
// try again
$uniqueName = ComponentbuilderHelper::safeString($name . '_' . $counter);
$uniqueName = ComponentbuilderHelper::safeFieldName($name . '_' . $counter);
}
// set the new name number
$this->uniqueNames[$view]['names'][$uniqueName] = $counter;
@ -4269,12 +4392,11 @@ class Get
{
return false;
}
// only load if string is not already set
// build lang key
$keyLang = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($string, 'U');
if (!isset($this->langContent[$this->lang][$keyLang]))
{
$this->langContent[$this->lang][$keyLang] = trim($string);
}
// set the language string
$this->setLangContent($this->lang, $keyLang, $string);
return $keyLang;
}
@ -5743,7 +5865,7 @@ class Get
$joomla = getcwd();
$counter = array(1 => 0, 2 => 0);
// file types to get
$fileTypes = array('\.php', '\.js');
$fileTypes = array('\.php', '\.js', '\.xml');
// set some local placeholders
$placeholders = array();
$placeholders[ComponentbuilderHelper::safeString($this->componentCodeName, 'F') . 'Helper::'] = $this->bbb . 'Component' . $this->ddd . 'Helper::';
@ -5756,8 +5878,11 @@ class Get
chdir($path);
foreach ($fileTypes as $type)
{
// get a list of files in the current directory tree (only PHP and JS for now)
// get a list of files in the current directory tree (only PHP, JS and XML for now)
$files = JFolder::files('.', $type, true, true);
// check if files found
if (ComponentbuilderHelper::checkArray($files))
{
foreach ($files as $file)
{
$this->searchFileContent($counter, $file, $target, $this->customCodePlaceholders, $placeholders, $today);
@ -5774,6 +5899,7 @@ class Get
}
}
}
}
// change back to Joomla working directory
chdir($joomla);
// make sure all code is stored
@ -6189,7 +6315,7 @@ class Get
* @param string $updateString The string to update
* @param string $string The string to use lang update
*
* @return array
* @return string
*
*/
protected function setReverseLangPlaceholders($updateString, $string)
@ -6230,12 +6356,10 @@ class Get
{
continue;
}
// only load if string is not already set
// build lang key
$keyLang = $this->langPrefix . '_' . $_keyLang;
if (!isset($this->langContent[$this->lang][$keyLang]))
{
$this->langContent[$this->lang][$keyLang] = trim($lang);
}
// set lang content string
$this->setLangContent($this->lang, $keyLang, $lang);
// reverse the placeholders
foreach ($langStringTargets as $langStringTarget)
{
@ -6264,8 +6388,6 @@ class Get
* 2 -> Check if data string has placeholders
* 3 -> Remove placeholders not in data string
*
* @param int $langSwitch The lang switch
*
* @return string
*
*/

View File

@ -19,14 +19,14 @@ class Structure extends Get
{
/**
* The foulder counter
* The folder counter
*
* @var int
*/
public $folderCount = 0;
/**
* The foulder counter
* The file counter
*
* @var int
*/
@ -367,6 +367,8 @@ class Structure extends Get
$this->setLibaries();
// set the Joomla Version Data
$this->joomlaVersionData = $this->setJoomlaVersionData();
// Trigger Event: jcb_ce_onAfterSetJoomlaVersionData
$this->triggerEvent('jcb_ce_onAfterSetJoomlaVersionData', array(&$this->componentContext, &$this->joomlaVersionData));
// set the dashboard
$this->setDynamicDashboard();
// set the new folders
@ -416,6 +418,8 @@ class Structure extends Get
{
if (ComponentbuilderHelper::checkArray($this->libraries))
{
// Trigger Event: jcb_ce_onBeforeSetLibaries
$this->triggerEvent('jcb_ce_onBeforeSetLibaries', array(&$this->componentContext, &$this->libraries));
// creat the main component folder
if (!JFolder::exists($this->componentPath))
{
@ -774,7 +778,7 @@ class Structure extends Get
{
if (ComponentbuilderHelper::checkObject($this->joomlaVersionData->move->static))
{
$codeName = ComponentbuilderHelper::safeString($this->componentData->name_code);
$codeName = $this->componentCodeName;
// TODO needs more looking at this must be dynamic actualy
$this->notNew[] = 'PHPExcel.php';
$this->notNew[] = 'LICENSE.txt';

View File

@ -380,42 +380,42 @@ class Fields extends Structure
$langView = $this->langPrefix . '_' . $this->placeholders[$this->hhh . 'VIEW' . $this->hhh];
$langViews = $this->langPrefix . '_' . $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh];
// set default lang
$this->langContent[$this->lang][$langView] = $view['settings']->name_single;
$this->langContent[$this->lang][$langViews] = $view['settings']->name_list;
$this->setLangContent($this->lang, $langView, $view['settings']->name_single);
$this->setLangContent($this->lang, $langViews, $view['settings']->name_list);
// set global item strings
$this->langContent[$this->lang][$langViews . '_N_ITEMS_ARCHIVED'] = "%s " . $view['settings']->name_list . " archived.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_ARCHIVED_1'] = "%s " . $view['settings']->name_single . " archived.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_CHECKED_IN_0'] = "No " . $view['settings']->name_single . " successfully checked in.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_CHECKED_IN_1'] = "%d " . $view['settings']->name_single . " successfully checked in.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_CHECKED_IN_MORE'] = "%d " . $view['settings']->name_list . " successfully checked in.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_DELETED'] = "%s " . $view['settings']->name_list . " deleted.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_DELETED_1'] = "%s " . $view['settings']->name_single . " deleted.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_FEATURED'] = "%s " . $view['settings']->name_list . " featured.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_FEATURED_1'] = "%s " . $view['settings']->name_single . " featured.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_PUBLISHED'] = "%s " . $view['settings']->name_list . " published.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_PUBLISHED_1'] = "%s " . $view['settings']->name_single . " published.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_TRASHED'] = "%s " . $view['settings']->name_list . " trashed.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_TRASHED_1'] = "%s " . $view['settings']->name_single . " trashed.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_UNFEATURED'] = "%s " . $view['settings']->name_list . " unfeatured.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_UNFEATURED_1'] = "%s " . $view['settings']->name_single . " unfeatured.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_UNPUBLISHED'] = "%s " . $view['settings']->name_list . " unpublished.";
$this->langContent[$this->lang][$langViews . '_N_ITEMS_UNPUBLISHED_1'] = "%s " . $view['settings']->name_single . " unpublished.";
$this->langContent[$this->lang][$langViews . '_BATCH_OPTIONS'] = "Batch process the selected " . $view['settings']->name_list;
$this->langContent[$this->lang][$langViews . '_BATCH_TIP'] = "All changes will be applied to all selected " . $view['settings']->name_list;
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_ARCHIVED', "%s " . $view['settings']->name_list . " archived.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_ARCHIVED_1', "%s " . $view['settings']->name_single . " archived.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_CHECKED_IN_0', "No " . $view['settings']->name_single . " successfully checked in.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_CHECKED_IN_1', "%d " . $view['settings']->name_single . " successfully checked in.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_CHECKED_IN_MORE', "%d " . $view['settings']->name_list . " successfully checked in.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_DELETED', "%s " . $view['settings']->name_list . " deleted.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_DELETED_1', "%s " . $view['settings']->name_single . " deleted.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_FEATURED', "%s " . $view['settings']->name_list . " featured.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_FEATURED_1', "%s " . $view['settings']->name_single . " featured.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_PUBLISHED', "%s " . $view['settings']->name_list . " published.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_PUBLISHED_1', "%s " . $view['settings']->name_single . " published.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_TRASHED', "%s " . $view['settings']->name_list . " trashed.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_TRASHED_1', "%s " . $view['settings']->name_single . " trashed.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNFEATURED', "%s " . $view['settings']->name_list . " unfeatured.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNFEATURED_1', "%s " . $view['settings']->name_single . " unfeatured.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNPUBLISHED', "%s " . $view['settings']->name_list . " unpublished.");
$this->setLangContent($this->lang, $langViews . '_N_ITEMS_UNPUBLISHED_1', "%s " . $view['settings']->name_single . " unpublished.");
$this->setLangContent($this->lang, $langViews . '_BATCH_OPTIONS', "Batch process the selected " . $view['settings']->name_list);
$this->setLangContent($this->lang, $langViews . '_BATCH_TIP', "All changes will be applied to all selected " . $view['settings']->name_list);
// set some basic defaults
$this->langContent[$this->lang][$langView . '_ERROR_UNIQUE_ALIAS'] = "Another " . $view['settings']->name_single . " has the same alias.";
$this->langContent[$this->lang][$langView . '_CREATED_DATE_LABEL'] = "Created Date";
$this->langContent[$this->lang][$langView . '_CREATED_DATE_DESC'] = "The date this " . $view['settings']->name_single . " was created.";
$this->langContent[$this->lang][$langView . '_MODIFIED_DATE_LABEL'] = "Modified Date";
$this->langContent[$this->lang][$langView . '_MODIFIED_DATE_DESC'] = "The date this " . $view['settings']->name_single . " was modified.";
$this->langContent[$this->lang][$langView . '_CREATED_BY_LABEL'] = "Created By";
$this->langContent[$this->lang][$langView . '_CREATED_BY_DESC'] = "The user that created this " . $view['settings']->name_single . ".";
$this->langContent[$this->lang][$langView . '_MODIFIED_BY_LABEL'] = "Modified By";
$this->langContent[$this->lang][$langView . '_MODIFIED_BY_DESC'] = "The last user that modified this " . $view['settings']->name_single . ".";
$this->langContent[$this->lang][$langView . '_ORDERING_LABEL'] = "Ordering";
$this->langContent[$this->lang][$langView . '_VERSION_LABEL'] = "Revision";
$this->langContent[$this->lang][$langView . '_VERSION_DESC'] = "A count of the number of times this " . $view['settings']->name_single . " has been revised.";
$this->langContent[$this->lang][$langView . '_SAVE_WARNING'] = "Alias already existed so a number was added at the end. You can re-edit the " . $view['settings']->name_single . " to customise the alias.";
$this->setLangContent($this->lang, $langView . '_ERROR_UNIQUE_ALIAS', "Another " . $view['settings']->name_single . " has the same alias.");
$this->setLangContent($this->lang, $langView . '_CREATED_DATE_LABEL', "Created Date");
$this->setLangContent($this->lang, $langView . '_CREATED_DATE_DESC', "The date this " . $view['settings']->name_single . " was created.");
$this->setLangContent($this->lang, $langView . '_MODIFIED_DATE_LABEL', "Modified Date");
$this->setLangContent($this->lang, $langView . '_MODIFIED_DATE_DESC', "The date this " . $view['settings']->name_single . " was modified.");
$this->setLangContent($this->lang, $langView . '_CREATED_BY_LABEL', "Created By");
$this->setLangContent($this->lang, $langView . '_CREATED_BY_DESC', "The user that created this " . $view['settings']->name_single . ".");
$this->setLangContent($this->lang, $langView . '_MODIFIED_BY_LABEL', "Modified By");
$this->setLangContent($this->lang, $langView . '_MODIFIED_BY_DESC', "The last user that modified this " . $view['settings']->name_single . ".");
$this->setLangContent($this->lang, $langView . '_ORDERING_LABEL', "Ordering");
$this->setLangContent($this->lang, $langView . '_VERSION_LABEL', "Revision");
$this->setLangContent($this->lang, $langView . '_VERSION_DESC', "A count of the number of times this " . $view['settings']->name_single . " has been revised.");
$this->setLangContent($this->lang, $langView . '_SAVE_WARNING', "Alias already existed so a number was added at the end. You can re-edit the " . $view['settings']->name_single . " to customise the alias.");
// check what type of field builder to use
if ($this->fieldBuilderType == 1)
{
@ -456,11 +456,15 @@ class Fields extends Structure
$dynamicFields = '';
// set the custom table key
$dbkey = 'g';
// Trigger Event: jcb_ce_onBeforeBuildFields
$this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$this->componentContext, &$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
// TODO we should add the global and local view switch if field for front end
foreach ($view['settings']->fields as $field)
{
$dynamicFields .= $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true);
}
// Trigger Event: jcb_ce_onAfterBuildFields
$this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$this->componentContext, &$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
// set the default fields
$fieldSet = array();
$fieldSet[] = '<fieldset name="details">';
@ -724,11 +728,15 @@ class Fields extends Structure
$dynamicFieldsXML = array();
// set the custom table key
$dbkey = 'g';
// Trigger Event: jcb_ce_onBeforeBuildFields
$this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
// TODO we should add the global and local view switch if field for front end
foreach ($view['settings']->fields as $field)
{
$dynamicFieldsXML[] = $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true);
}
// Trigger Event: jcb_ce_onAfterBuildFields
$this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$this->componentContext, &$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews));
// set the default fields
$XML = new simpleXMLElement('<a/>');
$fieldSetXML = $XML->addChild('fieldset');
@ -1206,7 +1214,7 @@ class Fields extends Structure
if ($setType === 'option')
{
// now add to the field set
$field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(1) . $taber . $this->_t(1) . "<field";
$optionSet = '';
foreach ($fieldAttributes as $property => $value)
@ -1228,9 +1236,9 @@ class Fields extends Structure
{
// has other value then text
list($v, $t) = explode('|', $option);
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $t;
$this->setLangContent($this->lang, $langValue, $t);
// no add to option set
$optionSet .= PHP_EOL . $this->_t(1) . $taber . $this->_t(2) . '<option value="' . $v . '">' . PHP_EOL . $this->_t(1) . $taber . $this->_t(3) . $langValue . '</option>';
$optionArray[$v] = $langValue;
@ -1238,9 +1246,9 @@ class Fields extends Structure
else
{
// text is also the value
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($option, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($option, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $option;
$this->setLangContent($this->lang, $langValue, $option);
// no add to option set
$optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . '<option value="' . $option . '">' . PHP_EOL . $this->_t(2) . $taber . $this->_t(2) . $langValue . '</option>';
$optionArray[$option] = $langValue;
@ -1254,9 +1262,9 @@ class Fields extends Structure
{
// has other value then text
list($v, $t) = explode('|', $value);
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $t;
$this->setLangContent($this->lang, $langValue, $t);
// no add to option set
$optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . '<option value="' . $v . '">' . PHP_EOL . $this->_t(2) . $taber . $this->_t(2) . $langValue . '</option>';
$optionArray[$v] = $langValue;
@ -1264,9 +1272,9 @@ class Fields extends Structure
else
{
// text is also the value
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($value, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($value, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $value;
$this->setLangContent($this->lang, $langValue, $value);
// no add to option set
$optionSet .= PHP_EOL . $this->_t(2) . $taber . $this->_t(1) . '<option value="' . $value . '">' . PHP_EOL . $this->_t(2) . $taber . $this->_t(2) . $langValue . '</option>';
$optionArray[$value] = $langValue;
@ -1298,7 +1306,7 @@ class Fields extends Structure
elseif ($setType === 'plain')
{
// now add to the field set
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . $taber . "<field";
foreach ($fieldAttributes as $property => $value)
{
@ -1312,7 +1320,7 @@ class Fields extends Structure
elseif ($setType === 'spacer')
{
// now add to the field set
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . "<field";
foreach ($fieldAttributes as $property => $value)
{
@ -1329,7 +1337,7 @@ class Fields extends Structure
if ($typeName === 'repeatable')
{
// now add to the field set
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . "<field";
$fieldsSet = array();
foreach ($fieldAttributes as $property => $value)
@ -1404,9 +1412,9 @@ class Fields extends Structure
// now add to the field set
$field .= $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
// set lang (just incase)
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true);
// add to lang array
$this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W');
$this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W'));
// if label was set use instead
if (ComponentbuilderHelper::checkString($r_langLabel))
{
@ -1429,7 +1437,7 @@ class Fields extends Structure
elseif ($typeName === 'subform')
{
// now add to the field set
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla) -->";
$field .= PHP_EOL . $this->_t(2) . $taber . "<field";
$fieldsSet = array();
foreach ($fieldAttributes as $property => $value)
@ -1521,9 +1529,9 @@ class Fields extends Structure
// now add to the field set
$field .= $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray, null, $r_taber);
// set lang (just incase)
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true);
// add to lang array
$this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W');
$this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W'));
// if label was set use instead
if (ComponentbuilderHelper::checkString($r_langLabel))
{
@ -1545,7 +1553,7 @@ class Fields extends Structure
elseif ($setType === 'custom')
{
// now add to the field set
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom) -->";
$field .= PHP_EOL . $this->_t(2) . $taber . "<!--" . $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom) -->";
$field .= PHP_EOL . $this->_t(2) . $taber . "<field";
foreach ($fieldAttributes as $property => $value)
{
@ -1594,7 +1602,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement('<field/>');
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
foreach ($fieldAttributes as $property => $value)
{
@ -1616,9 +1624,9 @@ class Fields extends Structure
{
// has other value then text
list($v, $t) = explode('|', $option);
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $t;
$this->setLangContent($this->lang, $langValue, $t);
// no add to option set
$optionXML->addAttribute('value', $v);
$optionArray[$v] = $langValue;
@ -1626,9 +1634,9 @@ class Fields extends Structure
else
{
// text is also the value
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($option, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($option, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $option;
$this->setLangContent($this->lang, $langValue, $option);
// no add to option set
$optionXML->addAttribute('value', $option);
$optionArray[$option] = $langValue;
@ -1644,9 +1652,9 @@ class Fields extends Structure
{
// has other value then text
list($v, $t) = explode('|', $value);
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($t, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($t, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $t;
$this->setLangContent($this->lang, $langValue, $t);
// no add to option set
$optionXML->addAttribute('value', $v);
$optionArray[$v] = $langValue;
@ -1654,9 +1662,9 @@ class Fields extends Structure
else
{
// text is also the value
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($value, 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($value, true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $value;
$this->setLangContent($this->lang, $langValue, $value);
// no add to option set
$optionXML->addAttribute('value', $value);
$optionArray[$value] = $langValue;
@ -1675,7 +1683,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement('<field/>');
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
foreach ($fieldAttributes as $property => $value)
{
@ -1689,7 +1697,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement('<field/>');
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla)";
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". A None Database Field. (joomla)";
foreach ($fieldAttributes as $property => $value)
{
@ -1706,7 +1714,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement('<field/>');
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (depreciated)";
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (depreciated)";
foreach ($fieldAttributes as $property => $value)
{
@ -1783,9 +1791,9 @@ class Fields extends Structure
// now add to the field set
ComponentbuilderHelper::xmlAppend($fieldSetXML, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
// set lang (just incase)
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true);
// add to lang array
$this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W');
$this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W'));
// if label was set use instead
if (ComponentbuilderHelper::checkString($r_langLabel))
{
@ -1806,7 +1814,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement('<field/>');
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (joomla)";
// add all properties
foreach ($fieldAttributes as $property => $value)
{
@ -1910,9 +1918,9 @@ class Fields extends Structure
// now add to the field set
ComponentbuilderHelper::xmlAppend($form, $this->setField('custom', $r_fieldValues, $r_name, $r_typeName, $langView, $view_name_single, $view_name_list, $placeholders, $r_optionArray));
// set lang (just incase)
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeString($r_name, 'U');
$r_listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($r_name, true);
// add to lang array
$this->langContent[$this->lang][$r_listLangName] = ComponentbuilderHelper::safeString($r_name, 'W');
$this->setLangContent($this->lang, $r_listLangName, ComponentbuilderHelper::safeString($r_name, 'W'));
// if label was set use instead
if (ComponentbuilderHelper::checkString($r_langLabel))
{
@ -1934,7 +1942,7 @@ class Fields extends Structure
{
// now add to the field set
$field->fieldXML = new SimpleXMLElement('<field/>');
$field->comment = $this->setLine(__LINE__) . " " . ComponentbuilderHelper::safeString($name, 'F') . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom)";
$field->comment = $this->setLine(__LINE__) . " " . ucfirst($name) . " Field. Type: " . ComponentbuilderHelper::safeString($typeName, 'F') . ". (custom)";
foreach ($fieldAttributes as $property => $value)
{
if ($property != 'option')
@ -2005,7 +2013,7 @@ class Fields extends Structure
{
$this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']][(int) $field['order_edit']] = $name;
}
// check if publishing fields were over written
// check if default fields were over written
if (in_array($name, $this->defaultFields))
{
// just to eliminate
@ -2047,7 +2055,7 @@ class Fields extends Structure
{
$this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']][(int) $field['order_edit']] = $name;
}
// check if publishing fields were over written
// check if default fields were over written
if (in_array($name, $this->defaultFields))
{
// just to eliminate
@ -2249,14 +2257,14 @@ class Fields extends Structure
}
elseif ($property['name'] === 'button' && $setCustom)
{
// dont load the button to repeatable
// load the button string value if found
$xmlValue = (string) ComponentbuilderHelper::safeString(ComponentbuilderHelper::getBetween($field['settings']->xml, 'button="', '"'));
// add to custom values
$fieldAttributes['custom']['add_button'] = (ComponentbuilderHelper::checkString($xmlValue) || 1 == $xmlValue) ? $xmlValue : 'false';
}
elseif ($property['name'] === 'required' && $repeatable)
elseif ($property['name'] === 'required' && 'repeatable' === $typeName)
{
// dont load the required to repeatable
// dont load the required to repeatable field type
$xmlValue = 'false';
}
elseif ($viewType == 2 && ($property['name'] === 'readonly' || $property['name'] === 'disabled'))
@ -2320,9 +2328,9 @@ class Fields extends Structure
$customLabel = $xmlValue;
}
// set lang key
$langValue = $langView . '_' . ComponentbuilderHelper::safeString($name . ' ' . $property['name'], 'U');
$langValue = $langView . '_' . ComponentbuilderHelper::safeFieldName($name . ' ' . $property['name'], true);
// add to lang array
$this->langContent[$this->lang][$langValue] = $xmlValue;
$this->setLangContent($this->lang, $langValue, $xmlValue);
// use lang value
$xmlValue = $langValue;
}
@ -2552,16 +2560,16 @@ class Fields extends Structure
$tempName = $view_name_single . ' category';
}
// set lang
$listLangName = $langView . '_' . ComponentbuilderHelper::safeString($tempName, 'U');
$listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($tempName, true);
// add to lang array
$this->langContent[$this->lang][$listLangName] = ComponentbuilderHelper::safeString($tempName, 'W');
$this->setLangContent($this->lang, $listLangName, ComponentbuilderHelper::safeString($tempName, 'W'));
}
else
{
// set lang (just incase)
$listLangName = $langView . '_' . ComponentbuilderHelper::safeString($name, 'U');
$listLangName = $langView . '_' .ComponentbuilderHelper::safeFieldName($name, true);
// add to lang array
$this->langContent[$this->lang][$listLangName] = ComponentbuilderHelper::safeString($name, 'W');
$this->setLangContent($this->lang, $listLangName, ComponentbuilderHelper::safeString($name, 'W'));
// if label was set use instead
if (ComponentbuilderHelper::checkString($langLabel))
{
@ -2702,6 +2710,11 @@ class Fields extends Structure
}
// get the xml extension name
$_extension = $this->setPlaceholders(ComponentbuilderHelper::getBetween($field['settings']->xml, 'extension="', '"'), $this->placeholders);
// if they left out the extention for some reason
if (!ComponentbuilderHelper::checkString($_extension))
{
$_extension = 'com_' . $this->componentCodeName . '.' . $otherView;
}
// load the category builder
$this->categoryBuilder[$view_name_list] = array('code' => $name, 'name' => $listLangName, 'extension' => $_extension);
// also set code name for title alias fix
@ -2863,9 +2876,9 @@ class Fields extends Structure
$this->bbb . 'CODE' . $this->ddd => $data['code'],
$this->bbb . 'view_type' . $this->ddd => $view_name_single . '_' . $data['type'],
$this->bbb . 'type' . $this->ddd => $data['type'],
$this->bbb . 'com_component' . $this->ddd => (isset($data['custom']['component']) && ComponentbuilderHelper::checkString($data['custom']['component'])) ? ComponentbuilderHelper::safeString($data['custom']['component']) : 'com_' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh],
$this->bbb . 'com_component' . $this->ddd => (isset($data['custom']['component']) && ComponentbuilderHelper::checkString($data['custom']['component'])) ? ComponentbuilderHelper::safeString($data['custom']['component']) : 'com_' . $this->componentCodeName,
// set the generic values
$this->bbb . 'component' . $this->ddd => $this->fileContentStatic[$this->hhh . 'component' . $this->hhh],
$this->bbb . 'component' . $this->ddd => $this->componentCodeName,
$this->bbb . 'Component' . $this->ddd => $this->fileContentStatic[$this->hhh . 'Component' . $this->hhh],
$this->bbb . 'view' . $this->ddd => (isset($data['custom']['view']) && ComponentbuilderHelper::checkString($data['custom']['view'])) ? ComponentbuilderHelper::safeString($data['custom']['view']) : $view_name_single,
$this->bbb . 'views' . $this->ddd => (isset($data['custom']['views']) && ComponentbuilderHelper::checkString($data['custom']['views'])) ? ComponentbuilderHelper::safeString($data['custom']['views']) : $view_name_list
@ -2996,9 +3009,9 @@ class Fields extends Structure
// temp holder for name
$tempName = $data['custom']['label'] . ' Group';
// set lang
$groupLangName = $this->langPrefix . '_' . ComponentbuilderHelper::safeString($tempName, 'U');
$groupLangName = $this->langPrefix . '_' . ComponentbuilderHelper::safeFieldName($tempName, true);
// add to lang array
$this->langContent[$this->lang][$groupLangName] = ComponentbuilderHelper::safeString($tempName, 'W');
$this->setLangContent($this->lang, $groupLangName, ComponentbuilderHelper::safeString($tempName, 'W'));
// build the Group Control
$this->setGroupControl[$data['type']] = $groupLangName;
// JFORM_GETGROUPS_PHP <<<DYNAMIC>>>
@ -3033,7 +3046,7 @@ class Fields extends Structure
ComponentbuilderHelper::checkString($fieldData['view']) && ComponentbuilderHelper::checkString($fieldData['views']))
{
// set local component
$local_component = "com_" . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh];
$local_component = "com_" . $this->componentCodeName;
// check that the component value is set
if (!isset($fieldData['component']) || !ComponentbuilderHelper::checkString($fieldData['component']))
{
@ -3049,6 +3062,10 @@ class Fields extends Structure
{
$fieldData['component'] = $this->setPlaceholders($fieldData['component'], $this->placeholders);
}
// get core permissions
$coreLoad = false;
// add ref tags
$refLoad = true;
// fall back on the field component
$component = $fieldData['component'];
// check if we should add ref tags (since it only works well on local views)
@ -3057,10 +3074,7 @@ class Fields extends Structure
// do not add ref tags
$refLoad = false;
}
// get core permissions
$coreLoad = false;
// add ref tags
$refLoad = true;
// get core permisssions
if (isset($this->permissionCore[$fieldData['view']]))
{
// get the core permission naming array
@ -3080,15 +3094,15 @@ class Fields extends Structure
$addButton[] = $this->_t(1) . "protected function getInput()";
$addButton[] = $this->_t(1) . "{";
$addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " see if we should add buttons";
$addButton[] = $this->_t(2) . "\$setButton = \$this->getAttribute('button');";
$addButton[] = $this->_t(2) . "\$set_button = \$this->getAttribute('button');";
$addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " get html";
$addButton[] = $this->_t(2) . "\$html = parent::getInput();";
$addButton[] = $this->_t(2) . "//" . $this->setLine(__LINE__) . " if true set button";
$addButton[] = $this->_t(2) . "if (\$setButton === 'true')";
$addButton[] = $this->_t(2) . "if (\$set_button === 'true')";
$addButton[] = $this->_t(2) . "{";
$addButton[] = $this->_t(3) . "\$button = array();";
$addButton[] = $this->_t(3) . "\$script = array();";
$addButton[] = $this->_t(3) . "\$buttonName = \$this->getAttribute('name');";
$addButton[] = $this->_t(3) . "\$button_code_name = \$this->getAttribute('name');";
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get the input from url";
$addButton[] = $this->_t(3) . "\$app = JFactory::getApplication();";
$addButton[] = $this->_t(3) . "\$jinput = \$app->input;";
@ -3130,6 +3144,13 @@ class Fields extends Structure
$addButton[] = $this->_t(4) . "\$refJ = '&return=' . \$_return;";
$addButton[] = $this->_t(3) . "}";
}
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get button label";
$addButton[] = $this->_t(3) . "\$button_label = trim(\$button_code_name);";
$addButton[] = $this->_t(3) . "\$button_label = preg_replace('/_+/', ' ', \$button_label);";
$addButton[] = $this->_t(3) . "\$button_label = preg_replace('/\s+/', ' ', \$button_label);";
$addButton[] = $this->_t(3) . "\$button_label = preg_replace(\"/[^A-Za-z ]/\", '', \$button_label);";
$addButton[] = $this->_t(3) . "\$button_label = ucfirst(strtolower(\$button_label));";
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " get user object";
$addButton[] = $this->_t(3) . "\$user = JFactory::getUser();";
$addButton[] = $this->_t(3) . "//" . $this->setLine(__LINE__) . " only add if user allowed to create " . $fieldData['view'];
// check if the item has permissions.
@ -3143,12 +3164,7 @@ class Fields extends Structure
}
$addButton[] = $this->_t(3) . "{";
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " build Create button";
$addButton[] = $this->_t(4) . "\$buttonNamee = trim(\$buttonName);";
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);";
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
$addButton[] = $this->_t(4) . "\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
$addButton[] = $this->_t(4) . "\$button[] = '<a id=\"'.\$buttonName.'Create\" class=\"btn btn-small btn-success hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_CREATE_NEW_S', \$buttonNamee).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\"";
$addButton[] = $this->_t(4) . "\$button[] = '<a id=\"'.\$button_code_name.'Create\" class=\"btn btn-small btn-success hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_CREATE_NEW_S', \$button_label).'\" style=\"border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;\"";
$addButton[] = $this->_t(5) . "href=\"index.php?option=" . $fieldData['component'] . "&amp;view=" . $fieldData['view'] . "&amp;layout=edit'.\$ref.'\" >";
$addButton[] = $this->_t(5) . "<span class=\"icon-new icon-white\"></span></a>';";
$addButton[] = $this->_t(3) . "}";
@ -3156,45 +3172,40 @@ class Fields extends Structure
// check if the item has permissions.
if ($coreLoad && isset($core['core.edit']) && isset($this->permissionBuilder['global'][$core['core.edit']]) && ComponentbuilderHelper::checkArray($this->permissionBuilder['global'][$core['core.edit']]) && in_array($fieldData['view'], $this->permissionBuilder['global'][$core['core.edit']]))
{
$addButton[] = $this->_t(3) . "if ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('" . $core['core.edit'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
$addButton[] = $this->_t(3) . "if (\$user->authorise('" . $core['core.edit'] . "', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
else
{
$addButton[] = $this->_t(3) . "if ((\$buttonName === '" . $fieldData['view'] . "' || \$buttonName === '" . $fieldData['views'] . "') && \$user->authorise('core.edit', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
$addButton[] = $this->_t(3) . "if (\$user->authorise('core.edit', '" . $component . "') && \$app->isAdmin()) // TODO for now only in admin area.";
}
$addButton[] = $this->_t(3) . "{";
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " build edit button";
$addButton[] = $this->_t(4) . "\$buttonNamee = trim(\$buttonName);";
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/_+/', ' ', \$buttonNamee);";
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace('/\s+/', ' ', \$buttonNamee);";
$addButton[] = $this->_t(4) . "\$buttonNamee = preg_replace(\"/[^A-Za-z ]/\", '', \$buttonNamee);";
$addButton[] = $this->_t(4) . "\$buttonNamee = ucfirst(strtolower(\$buttonNamee));";
$addButton[] = $this->_t(4) . "\$button[] = '<a id=\"'.\$buttonName.'Edit\" class=\"btn btn-small hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_EDIT_S', \$buttonNamee).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >";
$addButton[] = $this->_t(4) . "\$button[] = '<a id=\"'.\$button_code_name.'Edit\" class=\"btn btn-small hasTooltip\" title=\"'.JText:" . ":sprintf('" . $this->langPrefix . "_EDIT_S', \$button_label).'\" style=\"display: none; padding: 4px 4px 4px 7px;\" href=\"#\" >";
$addButton[] = $this->_t(5) . "<span class=\"icon-edit\"></span></a>';";
$addButton[] = $this->_t(4) . "//" . $this->setLine(__LINE__) . " build script";
$addButton[] = $this->_t(4) . "\$script[] = \"";
$addButton[] = $this->_t(5) . "jQuery(document).ready(function() {";
$addButton[] = $this->_t(6) . "jQuery('#adminForm').on('change', '#jform_\".\$buttonName.\"',function (e) {";
$addButton[] = $this->_t(6) . "jQuery('#adminForm').on('change', '#jform_\".\$button_code_name.\"',function (e) {";
$addButton[] = $this->_t(7) . "e.preventDefault();";
$addButton[] = $this->_t(7) . "var \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
$addButton[] = $this->_t(7) . "\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
$addButton[] = $this->_t(7) . "var \".\$button_code_name.\"Value = jQuery('#jform_\".\$button_code_name.\"').val();";
$addButton[] = $this->_t(7) . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
$addButton[] = $this->_t(6) . "});";
$addButton[] = $this->_t(6) . "var \".\$buttonName.\"Value = jQuery('#jform_\".\$buttonName.\"').val();";
$addButton[] = $this->_t(6) . "\".\$buttonName.\"Button(\".\$buttonName.\"Value);";
$addButton[] = $this->_t(6) . "var \".\$button_code_name.\"Value = jQuery('#jform_\".\$button_code_name.\"').val();";
$addButton[] = $this->_t(6) . "\".\$button_code_name.\"Button(\".\$button_code_name.\"Value);";
$addButton[] = $this->_t(5) . "});";
$addButton[] = $this->_t(5) . "function \".\$buttonName.\"Button(value) {";
$addButton[] = $this->_t(5) . "function \".\$button_code_name.\"Button(value) {";
$addButton[] = $this->_t(6) . "if (value > 0) {"; // TODO not ideal since value may not be an (int)
$addButton[] = $this->_t(7) . "// hide the create button";
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Create').hide();";
$addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Create').hide();";
$addButton[] = $this->_t(7) . "// show edit button";
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Edit').show();";
$addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Edit').show();";
$addButton[] = $this->_t(7) . "var url = 'index.php?option=" . $fieldData['component'] . "&view=" . $fieldData['views'] . "&task=" . $fieldData['view'] . ".edit&id='+value+'\".\$refJ.\"';"; // TODO this value may not be the ID
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Edit').attr('href', url);";
$addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Edit').attr('href', url);";
$addButton[] = $this->_t(6) . "} else {";
$addButton[] = $this->_t(7) . "// show the create button";
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Create').show();";
$addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Create').show();";
$addButton[] = $this->_t(7) . "// hide edit button";
$addButton[] = $this->_t(7) . "jQuery('#\".\$buttonName.\"Edit').hide();";
$addButton[] = $this->_t(7) . "jQuery('#\".\$button_code_name.\"Edit').hide();";
$addButton[] = $this->_t(6) . "}";
$addButton[] = $this->_t(5) . "}\";";
$addButton[] = $this->_t(3) . "}";

File diff suppressed because it is too large Load Diff

View File

@ -68,6 +68,9 @@ class Infusion extends Interpretation
{
if (isset($this->componentData->admin_views) && ComponentbuilderHelper::checkArray($this->componentData->admin_views))
{
// Trigger Event: jcb_ce_onBeforeBuildFilesContent
$this->triggerEvent('jcb_ce_onBeforeBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
// COMPONENT
$this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] = $this->placeholders[$this->hhh . 'COMPONENT' . $this->hhh];
@ -231,6 +234,9 @@ class Infusion extends Interpretation
// set the target
$this->target = 'admin';
$this->lang = 'admin';
// reset
$viewName_single = '';
$viewName_list = '';
// set single view
if (isset($view['settings']->name_single))
@ -269,8 +275,11 @@ class Infusion extends Interpretation
$this->setLockLicensePer($viewName_single, $this->target);
$this->setLockLicensePer($viewName_list, $this->target);
// Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent
$this->triggerEvent('jcb_ce_onBeforeBuildAdminEditViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh));
// FIELDSETS <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single][$this->hhh . 'FIELDSETS' . $this->hhh] = $this->setFieldSet($view, $this->fileContentStatic[$this->hhh . 'component' . $this->hhh], $viewName_single, $viewName_list);
$this->fileContentDynamic[$viewName_single][$this->hhh . 'FIELDSETS' . $this->hhh] = $this->setFieldSet($view, $this->componentCodeName, $viewName_single, $viewName_list);
// ACCESSCONTROL <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single][$this->hhh . 'ACCESSCONTROL' . $this->hhh] = $this->setFieldSetAccessControl($viewName_single);
@ -367,6 +376,12 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$viewName_single][$this->hhh . 'SITE_MENU_XML' . $this->hhh] = $this->setAdminViewMenu($viewName_single, $view);
}
}
// TABLAYOUTFIELDSARRAY <<<DYNAMIC>>> add the tab layout fields array to the model
$this->fileContentDynamic[$viewName_single][$this->hhh . 'TABLAYOUTFIELDSARRAY' . $this->hhh] = $this->getTabLayoutFieldsArray($viewName_single);
// Trigger Event: jcb_ce_onAfterBuildAdminEditViewContent
$this->triggerEvent('jcb_ce_onAfterBuildAdminEditViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh));
}
// set the views names
if (isset($view['settings']->name_list) && $view['settings']->name_list != 'null')
@ -376,6 +391,9 @@ class Infusion extends Interpretation
// ICOMOON <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list][$this->hhh . 'ICOMOON' . $this->hhh] = $view['icomoon'];
// Trigger Event: jcb_ce_onBeforeBuildAdminListViewContent
$this->triggerEvent('jcb_ce_onBeforeBuildAdminListViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh));
// set the export/import option
if (isset($view['port']) && $view['port'] || 1 == $view['settings']->add_custom_import)
{
@ -396,7 +414,7 @@ class Infusion extends Interpretation
if (isset($view['checkin']) && $view['checkin'] == 1)
{
// AUTOCHECKIN <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list][$this->hhh . 'AUTOCHECKIN' . $this->hhh] = $this->setAutoCheckin($viewName_single, $this->fileContentStatic[$this->hhh . 'component' . $this->hhh]);
$this->fileContentDynamic[$viewName_list][$this->hhh . 'AUTOCHECKIN' . $this->hhh] = $this->setAutoCheckin($viewName_single, $this->componentCodeName);
// CHECKINCALL <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list][$this->hhh . 'CHECKINCALL' . $this->hhh] = $this->setCheckinCall();
}
@ -505,6 +523,9 @@ class Infusion extends Interpretation
{
$this->fileContentDynamic[$viewName_list][$this->hhh . 'VIEWS_FOOTER_SCRIPT' . $this->hhh] = '';
}
// Trigger Event: jcb_ce_onAfterBuildAdminListViewContent
$this->triggerEvent('jcb_ce_onAfterBuildAdminListViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh));
}
// set u fields used in batch
@ -527,9 +548,16 @@ class Infusion extends Interpretation
// BATCH_ONCLICK_CANCEL_SCRIPT <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_list][$this->hhh . 'BATCH_ONCLICK_CANCEL_SCRIPT' . $this->hhh] = ''; // TODO <-- must still be build
// JCONTROLLERFORM_ALLOWADD <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_ALLOWADD' . $this->hhh] = $this->setJcontrollerAllowAdd($viewName_single, $viewName_list);
// JCONTROLLERFORM_BEFORECANCEL <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_BEFORECANCEL' . $this->hhh] = $this->getCustomScriptBuilder('php_before_cancel', $viewName_single, PHP_EOL, null, null, '');
// JCONTROLLERFORM_AFTERCANCEL <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_AFTERCANCEL' . $this->hhh] = $this->getCustomScriptBuilder('php_after_cancel', $viewName_single, PHP_EOL, null, null, '');
// JCONTROLLERFORM_ALLOWEDIT <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single][$this->hhh . 'JCONTROLLERFORM_ALLOWEDIT' . $this->hhh] = $this->setJcontrollerAllowEdit($viewName_single, $viewName_list);
@ -578,6 +606,9 @@ class Infusion extends Interpretation
}
// HELPER_EXEL
$this->fileContentStatic[$this->hhh . 'HELPER_EXEL' . $this->hhh] = $this->setExelHelperMethods();
// Trigger Event: jcb_ce_onAfterBuildAdminViewContent
$this->triggerEvent('jcb_ce_onAfterBuildAdminViewContent', array(&$this->componentContext, &$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
}
// setup custom_admin_views and all needed stuff for the site
@ -585,7 +616,6 @@ class Infusion extends Interpretation
{
$this->target = 'custom_admin';
$this->lang = 'admin';
// var_dump($this->componentData->custom_admin_views);exit;
// start dynamic build
foreach ($this->componentData->custom_admin_views as $view)
{
@ -598,14 +628,8 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'sviews' . $this->hhh] = $view['settings']->code;
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SVIEWS' . $this->hhh] = $view['settings']->CODE;
// add to lang array
if (!isset($this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE]))
{
$this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE] = $view['settings']->name;
}
if (!isset($this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC']))
{
$this->langContent[$this->lang][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC'] = $view['settings']->description;
}
$this->setLangContent($this->lang, $this->langPrefix . '_' . $view['settings']->CODE, $view['settings']->name);
$this->setLangContent($this->lang, $this->langPrefix . '_' . $view['settings']->CODE . '_DESC', $view['settings']->description);
// ICOMOON <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'ICOMOON' . $this->hhh] = $view['icomoon'];
@ -623,6 +647,9 @@ class Infusion extends Interpretation
$this->placeholders[$this->bbb . 'sviews' . $this->ddd] = $view['settings']->code;
$this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd] = $view['settings']->CODE;
// Trigger Event: jcb_ce_onBeforeBuildCustomAdminViewContent
$this->triggerEvent('jcb_ce_onBeforeBuildCustomAdminViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
// set license per view if needed
$this->setLockLicensePer($view['settings']->code, $this->target);
@ -673,6 +700,9 @@ class Infusion extends Interpretation
// setup the templates
$this->setCustomViewTemplateBody($view);
// Trigger Event: jcb_ce_onAfterBuildCustomAdminViewContent
$this->triggerEvent('jcb_ce_onAfterBuildCustomAdminViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
}
// setup the layouts
@ -713,22 +743,22 @@ class Infusion extends Interpretation
if (!ComponentbuilderHelper::checkString($this->dynamicDashboard))
{
// DASHBOARDVIEW
$this->fileContentStatic[$this->hhh . 'DASHBOARDVIEW' . $this->hhh] = $this->fileContentStatic[$this->hhh . 'component' . $this->hhh];
$this->fileContentStatic[$this->hhh . 'DASHBOARDVIEW' . $this->hhh] = $this->componentCodeName;
// DASHBOARDICONS
$this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASHBOARDICONS' . $this->hhh] = $this->setDashboardIcons();
$this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASHBOARDICONS' . $this->hhh] = $this->setDashboardIcons();
// DASHBOARDICONACCESS
$this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASHBOARDICONACCESS' . $this->hhh] = $this->setDashboardIconAccess();
$this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASHBOARDICONACCESS' . $this->hhh] = $this->setDashboardIconAccess();
// DASH_MODEL_METHODS
$this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASH_MODEL_METHODS' . $this->hhh] = $this->setDashboardModelMethods();
$this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASH_MODEL_METHODS' . $this->hhh] = $this->setDashboardModelMethods();
// DASH_GET_CUSTOM_DATA
$this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASH_GET_CUSTOM_DATA' . $this->hhh] = $this->setDashboardGetCustomData();
$this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASH_GET_CUSTOM_DATA' . $this->hhh] = $this->setDashboardGetCustomData();
// DASH_DISPLAY_DATA
$this->fileContentDynamic[$this->fileContentStatic[$this->hhh . 'component' . $this->hhh]][$this->hhh . 'DASH_DISPLAY_DATA' . $this->hhh] = $this->setDashboardDisplayData();
$this->fileContentDynamic[$this->componentCodeName][$this->hhh . 'DASH_DISPLAY_DATA' . $this->hhh] = $this->setDashboardDisplayData();
}
else
{
@ -814,7 +844,6 @@ class Infusion extends Interpretation
if (isset($this->componentData->site_views) && ComponentbuilderHelper::checkArray($this->componentData->site_views))
{
$this->target = 'site';
// var_dump($this->componentData->site_views);exit;
// start dynamic build
foreach ($this->componentData->site_views as $view)
{
@ -839,6 +868,9 @@ class Infusion extends Interpretation
$this->placeholders[$this->bbb . 'sviews' . $this->ddd] = $view['settings']->code;
$this->placeholders[$this->bbb . 'SVIEWS' . $this->ddd] = $view['settings']->CODE;
// Trigger Event: jcb_ce_onBeforeBuildSiteViewContent
$this->triggerEvent('jcb_ce_onBeforeBuildSiteViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
// set license per view if needed
$this->setLockLicensePer($view['settings']->code, $this->target);
@ -891,14 +923,8 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_AFTER_GET_ITEMS' . $this->hhh] = $this->getCustomScriptBuilder($this->target . '_php_after_getitems', $view['settings']->code, PHP_EOL, null, true);
}
// add to lang array
if (!isset($this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE]))
{
$this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE] = $view['settings']->name;
}
if (!isset($this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC']))
{
$this->langContent['site'][$this->langPrefix . '_' . $view['settings']->CODE . '_DESC'] = $view['settings']->description;
}
$this->setLangContent('site', $this->langPrefix . '_' . $view['settings']->CODE, $view['settings']->name);
$this->setLangContent('site', $this->langPrefix . '_' . $view['settings']->CODE . '_DESC', $view['settings']->description);
// SITE_CUSTOM_METHODS <<<DYNAMIC>>>
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_CUSTOM_METHODS' . $this->hhh] = $this->setCustomViewCustomItemMethods($view['settings']->main_get, $view['settings']->code);
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_CUSTOM_METHODS' . $this->hhh] .= $this->setCustomViewCustomMethods($view, $view['settings']->code);
@ -919,6 +945,9 @@ class Infusion extends Interpretation
// set the site form if needed
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_TOP_FORM' . $this->hhh] = $this->setCustomViewForm($view['settings']->code, 1);
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_BOTTOM_FORM' . $this->hhh] = $this->setCustomViewForm($view['settings']->code, 2);
// Trigger Event: jcb_ce_onAfterBuildSiteViewContent
$this->triggerEvent('jcb_ce_onAfterBuildSiteViewContent', array(&$this->componentContext, &$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh));
}
// setup the layouts
$this->setCustomViewLayouts();
@ -1002,6 +1031,10 @@ class Infusion extends Interpretation
{
$this->fileContentStatic[$this->hhh . 'README' . $this->hhh] = $this->componentData->readme;
}
// Trigger Event: jcb_ce_onAfterBuildFilesContent
$this->triggerEvent('jcb_ce_onAfterBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
return true;
}
return false;
@ -1129,6 +1162,9 @@ class Infusion extends Interpretation
// now we insert the values into the files
if (ComponentbuilderHelper::checkArray($this->languages))
{
// Trigger Event: jcb_ce_onBeforeBuildAllLangFiles
$this->triggerEvent('jcb_ce_onBeforeBuildAllLangFiles', array(&$this->componentContext, &$this->languages, &$this->langTag));
// rest xml array
$langXML = array();
foreach ($this->languages as $tag => $areas)
{
@ -1216,7 +1252,7 @@ class Infusion extends Interpretation
$replace[$this->hhh . 'SITE_LANGUAGES' . $this->hhh] = implode(PHP_EOL . $this->_t(2), $langXML['site']);
}
// build xml path
$xmlPath = $this->componentPath . '/' . $this->fileContentStatic[$this->hhh . 'component' . $this->hhh] . '.xml';
$xmlPath = $this->componentPath . '/' . $this->componentCodeName . '.xml';
// get the content in xml
$componentXML = ComponentbuilderHelper::getFileContents($xmlPath);
// update the xml content

View File

@ -124,6 +124,84 @@ abstract class ComponentbuilderHelper
'JPATH_THEMES' => JPATH_THEMES
);
/**
* Making class or function name safe
*
* @input string The name you would like to make safe
*
* @returns string on success
**/
public static function safeClassFunctionName($name)
{
// remove numbers if the first character is a number
if (is_numeric(substr($name, 0, 1)))
{
$name = self::replaceNumbers($name);
}
// remove all spaces and strange characters
return trim(reg_replace("/[^A-Za-z0-9]/", '', $name));
}
/**
* The field builder switch
**/
protected static $fieldNameBuilder = false;
/**
* Making field names safe
*
* @input string The you would like to make safe
* @input boolean The switch to return an ALL UPPER CASE string
* @input string The string to use in white space
*
* @returns string on success
**/
public static function safeFieldName($string, $allcap = false, $spacer = '_')
{
// get global value
if (self::$fieldNameBuilder === false)
{
self::$fieldNameBuilder = JComponentHelper::getParams('com_componentbuilder')->get('field_name_builder', 1);
}
// use the new convention
if (2 == self::$fieldNameBuilder)
{
// 0nly continue if we have a string
if (self::checkString($string))
{
// check that the first character is not a number
if (is_numeric(substr($string, 0, 1)))
{
$string = self::replaceNumbers($string);
}
// remove all other strange characters
$string = trim($string);
$string = preg_replace('/'.$spacer.'+/', ' ', $string);
$string = preg_replace('/\s+/', ' ', $string);
// remove all and keep only characters and numbers
$string = preg_replace("/[^A-Za-z0-9 ]/", '', $string);
// replace white space with underscore (SAFEST OPTION)
$string = preg_replace('/\s+/', $spacer, $string);
// return all caps
if ($allcap)
{
return strtoupper($string);
}
// default is to return lower
return strtolower($string);
}
// not a string
return '';
}
// return all caps
if ($allcap)
{
return self::safeString($string, 'U');
}
// use the default (original behaviour/convention)
return self::safeString($string);
}
/*
* Get the Array of Existing Validation Rule Names
*
@ -1200,13 +1278,13 @@ abstract class ComponentbuilderHelper
}
else
{
$name = self::safeString(self::getBetween($field->xml,'name="','"'));
$name = self::safeFieldName(self::getBetween($field->xml,'name="','"'));
}
// use field core name only if not found in xml
if (!self::checkString($name))
{
$name = self::safeString($field->name);;
$name = self::safeFieldName($field->name);
}
return array('name' => $name, 'type' => $field->type_name);
}
@ -1311,12 +1389,14 @@ abstract class ComponentbuilderHelper
// The banners by size
'banner' => array(
'728-90' => array(
'<a href="https://volunteers.joomla.org/" target="_blank" title="Joomla! Volunteers Portal"><img src="https://cdn.joomla.org/volunteers/joomla-heart-wide.gif" alt="Joomla! Volunteers Portal" width="728" height="90" border="0"></a>',
'<a href="https://magazine.joomla.org" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img alt="Joomla! Community Magazine | Because community matters..." src="https://magazine.joomla.org/images/banners/JCM_2010_728x90.png" width="728" height="90" border="0" /></a>'
'<a href="https://vdm.bz/joomla-volunteers" target="_blank" title="Joomla! Volunteers Portal"><img src="https://cdn.joomla.org/volunteers/joomla-heart-wide.gif" alt="Joomla! Volunteers Portal" width="728" height="90" border="0"></a>',
'<a href="https://vdm.bz/joomla-magazine" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img alt="Joomla! Community Magazine | Because community matters..." src="https://magazine.joomla.org/images/banners/JCM_2010_728x90.png" width="728" height="90" border="0" /></a>',
'<a href="https://vdm.bz/jcb-sponsor-tlwebdesign" target="_blank" title="tlwebdesign a JCB sponsor | Because community matters..."><img alt="tlwebdesign a JCB sponsor | Because community matters..." src="https://www.joomlacomponentbuilder.com/images/banners/tlwebdesign_jcb_sponsor_728_90.png" width="728" height="90" border="0" /></a>',
'<a href="https://vdm.bz/jcb-sponsor-vdm" target="_blank" title="VDM a JCB sponsor | Because community matters..."><img alt="VDM a JCB sponsor | Because community matters..." src="https://www.joomlacomponentbuilder.com/images/banners/vdm_jcb_sponsor_728_90.gif" width="728" height="90" border="0" /></a>'
),
'160-600' => array(
'<a href="https://volunteers.joomla.org/" target="_blank" title="Joomla! Volunteers Portal"><img src="https://cdn.joomla.org/volunteers/joomla-heart-tall.gif" alt="Joomla! Volunteers Portal" width="160" height="600" border="0"></a>',
'<a href="https://magazine.joomla.org" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img src="https://magazine.joomla.org/images/banners/JCM_2010_120x600.png" alt="Joomla! Community Magazine | Because community matters..." width="120" height="600" border="0"/></a>'
'<a href="https://vdm.bz/joomla-volunteers" target="_blank" title="Joomla! Volunteers Portal"><img src="https://cdn.joomla.org/volunteers/joomla-heart-tall.gif" alt="Joomla! Volunteers Portal" width="160" height="600" border="0"></a>',
'<a href="https://vdm.bz/joomla-magazine" target="_blank" title="Joomla! Community Magazine | Because community matters..."><img src="https://magazine.joomla.org/images/banners/JCM_2010_120x600.png" alt="Joomla! Community Magazine | Because community matters..." width="120" height="600" border="0"/></a>'
)
),
// The build-gif by size
@ -5478,38 +5558,42 @@ abstract class ComponentbuilderHelper
/**
* Get any component's model
**/
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $component = 'Componentbuilder', $config = array())
public static function getModel($name, $path = JPATH_COMPONENT_ADMINISTRATOR, $Component = 'Componentbuilder', $config = array())
{
// fix the name
$name = self::safeString($name);
// full path
$fullPath = $path . '/models';
// set prefix
$prefix = $component.'Model';
// full path to models
$fullPathModels = $path . '/models';
// load the model file
JModelLegacy::addIncludePath($fullPath, $prefix);
JModelLegacy::addIncludePath($fullPathModels, $Component . 'Model');
// make sure the table path is loaded
if (!isset($config['table_path']) || !self::checkString($config['table_path']))
{
// This is the JCB default path to tables in Joomla 3.x
$config['table_path'] = JPATH_ADMINISTRATOR . '/components/com_' . strtolower($Component) . '/tables';
}
// get instance
$model = JModelLegacy::getInstance($name, $prefix, $config);
$model = JModelLegacy::getInstance($name, $Component . 'Model', $config);
// if model not found (strange)
if ($model == false)
{
jimport('joomla.filesystem.file');
// get file path
$filePath = $path . '/' . $name . '.php';
$fullPath = $fullPath.'/'.$name.'.php';
$fullPathModel = $fullPathModels . '/' . $name . '.php';
// check if it exists
if (JFile::exists($filePath))
{
// get the file
require_once $filePath;
}
elseif (JFile::exists($fullPath))
elseif (JFile::exists($fullPathModel))
{
// get the file
require_once $fullPath;
require_once $fullPathModel;
}
// build class names
$modelClass = $prefix.$name;
$modelClass = $Component . 'Model' . $name;
if (class_exists($modelClass))
{
// initialize the model

View File

@ -493,10 +493,12 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_JAVASCRIPT_VIEW_FOOTER_LABEL="Add JavaScript
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_NEW_BUTTON="Add New Button"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_NEW_CLOSE_BUTTON="Add New & Close Button"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_NEW_NEW_CLOSE_BUTTON="Add New + New & Close Button"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_CANCEL="Add Php After Cancel"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_CANCEL_LABEL="Add PHP (script - after cancel)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE="Add Php After Delete"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_DELETE_LABEL="Add PHP (script - after delete)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH="Add Php After Publish"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL="Add PHP (script - after publish)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AFTER_PUBLISH_LABEL="Add PHP (script - after state change)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX="Add Php Ajax"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_AJAX_LABEL="Add PHP (AJAX)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_ALLOWADD="Add Php Allowadd"
@ -507,10 +509,12 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY="Add Php Batchcopy"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHCOPY_LABEL="Add PHP (batchCopy Method)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE="Add Php Batchmove"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BATCHMOVE_LABEL="Add PHP (batchMove Method)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_CANCEL="Add Php Before Cancel"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_CANCEL_LABEL="Add PHP (script - before cancel)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE="Add Php Before Delete"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_DELETE_LABEL="Add PHP (script - before delete)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH="Add Php Before Publish"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL="Add PHP (script - before publish)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_PUBLISH_LABEL="Add PHP (script - before state change)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE="Add Php Before Save"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_BEFORE_SAVE_LABEL="Add PHP (save Method - before data modeling)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ADD_PHP_DOCUMENT="Add Php Document"
@ -545,7 +549,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_ALIAS_BUILDER_TYPE_LABEL="Alias Builder Type"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALLOW_ZERO_DESCRIPTION="null & zero values"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALLOW_ZERO_LABEL="Allow"
COM_COMPONENTBUILDER_ADMIN_VIEW_ALNUM="ALNUM"
COM_COMPONENTBUILDER_ADMIN_VIEW_ARCHIVE="Archive"
COM_COMPONENTBUILDER_ADMIN_VIEW_ARCHIVE="ARCHIVE"
COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_ARMSCIIEIGHT_ARMENIAN_MOST_SUITABLE_COLLATION_ARMSCIIEIGHT_GENERAL_CI="armscii8 - ARMSCII-8 Armenian (most suitable collation = armscii8_general_ci)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_BIN_CHARSET_ARMSCIIEIGHT="armscii8_bin (charset = armscii8)"
COM_COMPONENTBUILDER_ADMIN_VIEW_ARMSCIIEIGHT_GENERAL_CI_CHARSET_ARMSCIIEIGHT="armscii8_general_ci (charset = armscii8)"
@ -746,9 +750,6 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_GENERIC="Generic"
COM_COMPONENTBUILDER_ADMIN_VIEW_GEOSTDEIGHT_BIN_CHARSET_GEOSTDEIGHT="geostd8_bin (charset = geostd8)"
COM_COMPONENTBUILDER_ADMIN_VIEW_GEOSTDEIGHT_GENERAL_CI_CHARSET_GEOSTDEIGHT="geostd8_general_ci (charset = geostd8)"
COM_COMPONENTBUILDER_ADMIN_VIEW_GEOSTDEIGHT_GEOSTDEIGHT_GEORGIAN_MOST_SUITABLE_COLLATION_GEOSTDEIGHT_GENERAL_CI="geostd8 - GEOSTD8 Georgian (most suitable collation = geostd8_general_ci)"
COM_COMPONENTBUILDER_ADMIN_VIEW_GLOBAL_DEFAULT_MYISAM="Global (default = MyISAM)"
COM_COMPONENTBUILDER_ADMIN_VIEW_GLOBAL_DEFAULT_UTFEIGHT="Global (default = utf8)"
COM_COMPONENTBUILDER_ADMIN_VIEW_GLOBAL_DEFAULT_UTFEIGHT_GENERAL_CI="Global (default = utf8_general_ci)"
COM_COMPONENTBUILDER_ADMIN_VIEW_GREEK_BIN_CHARSET_GREEK="greek_bin (charset = greek)"
COM_COMPONENTBUILDER_ADMIN_VIEW_GREEK_GENERAL_CI_CHARSET_GREEK="greek_general_ci (charset = greek)"
COM_COMPONENTBUILDER_ADMIN_VIEW_GREEK_ISO_EIGHT_THOUSAND_EIGHT_HUNDRED_AND_FIFTY_NINESEVEN_GREEK_MOST_SUITABLE_COLLATION_GREEK_GENERAL_CI="greek - ISO 8859-7 Greek (most suitable collation = greek_general_ci)"
@ -950,6 +951,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_NOTE_ON_TABS_LABEL="Tab Setup Options"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTIFICATION="Notification"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOTIFICATION_CIRCLE="Notification Circle"
COM_COMPONENTBUILDER_ADMIN_VIEW_NOT_REQUIRED="Not Required"
COM_COMPONENTBUILDER_ADMIN_VIEW_OMIT="Omit"
COM_COMPONENTBUILDER_ADMIN_VIEW_ONLY_FUNCTION="Only Function"
COM_COMPONENTBUILDER_ADMIN_VIEW_ORDERING_LABEL="Ordering"
COM_COMPONENTBUILDER_ADMIN_VIEW_PALETTE="Palette"
@ -971,6 +973,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_PERMISSION="Permissions"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHONE="Phone"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHONE_TWO="Phone 2"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP="PHP"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_CANCEL="Php After Cancel"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_CANCEL_DESCRIPTION="Add PHP Here that should run in the Cancel Method after cancel. Do not add the php tags."
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_CANCEL_LABEL="PHP Cancel Method after<br /><small>(string) $key is the name of the primary key of the URL variable.</small>"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE="Php After Delete"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_DESCRIPTION="Add PHP Here that should run in the delete Method after items were deleted. Do not add the php tags."
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_AFTER_DELETE_LABEL="PHP delete Method after<br /><small>Target (array) $pks is an array of record primary keys.</small>"
@ -992,6 +997,9 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHCOPY_LABEL="PHP batchCopy Method<br /><
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE="Php Batchmove"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_DESCRIPTION="Add PHP Here that should run in the batchMove Method. Do not add the php tags."
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BATCHMOVE_LABEL="PHP batchMove Method<br /><small>submitted values are in $values, id's are in $pks</small>"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_CANCEL="Php Before Cancel"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_CANCEL_DESCRIPTION="Add PHP Here that should run in the Cancel Method before cancel. Do not add the php tags."
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_CANCEL_LABEL="PHP Cancel Method before<br /><small>(string) $key is the name of the primary key of the URL variable.</small>"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE="Php Before Delete"
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_DESCRIPTION="Add PHP Here that should run in the delete Method before items are deleted. Do not add the php tags."
COM_COMPONENTBUILDER_ADMIN_VIEW_PHP_BEFORE_DELETE_LABEL="PHP delete Method<br /><small>Target (array) $pks is an array of record primary keys.</small>"
@ -1165,7 +1173,7 @@ COM_COMPONENTBUILDER_ADMIN_VIEW_TISSIX_HUNDRED_AND_TWENTY_TISSIX_HUNDRED_AND_TWE
COM_COMPONENTBUILDER_ADMIN_VIEW_TREE="Tree"
COM_COMPONENTBUILDER_ADMIN_VIEW_TREE_TWO="Tree 2"
COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE="Type"
COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_DESCRIPTION="for list target"
COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_DESCRIPTION="Set the type of view"
COM_COMPONENTBUILDER_ADMIN_VIEW_TYPE_LABEL="Type"
COM_COMPONENTBUILDER_ADMIN_VIEW_UCSTWO_BIN_CHARSET_UCSTWO="ucs2_bin (charset = ucs2)"
COM_COMPONENTBUILDER_ADMIN_VIEW_UCSTWO_CROATIAN_CI_CHARSET_UCSTWO="ucs2_croatian_ci (charset = ucs2)"
@ -2759,7 +2767,7 @@ COM_COMPONENTBUILDER_COMPONENT_UPDATES_URL_MESSAGE="Error! Please add url here."
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_DESC="A count of the number of times this Component Updates has been revised."
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_DESCRIPTION="1.0.0"
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_HINT="1.0.0"
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_LABEL="SQL Update Version"
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE="Version Update"
COM_COMPONENTBUILDER_COMPONENT_UPDATES_VERSION_UPDATE_DESCRIPTION="Add Version Updates Here!"
@ -2770,6 +2778,7 @@ COM_COMPONENTBUILDER_CONFIG_ACTIVE="Active"
COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_DESCRIPTION="Would you like to add a prefix to the Joomla menu name of your components"
COM_COMPONENTBUILDER_CONFIG_ADD_MENU_PREFIX_LABEL="Add Menu Prefix"
COM_COMPONENTBUILDER_CONFIG_ALMOST_FLAT_LOAD="Almost Flat"
COM_COMPONENTBUILDER_CONFIG_ALPHANUMERIC="Alphanumeric"
COM_COMPONENTBUILDER_CONFIG_API_DESCRIPTION="This User will be used to log the API call."
COM_COMPONENTBUILDER_CONFIG_API_LABEL="API User"
COM_COMPONENTBUILDER_CONFIG_AUTHOR="Author Info"
@ -2865,6 +2874,8 @@ COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_DESCRIPTION="Here you can set t
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_HINT="/home/user/compiler"
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_LABEL="Compiler Folder Path"
COM_COMPONENTBUILDER_CONFIG_COMPILER_FOLDER_PATH_MESSAGE="Error! Please add some text here."
COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_DESCRIPTION="Select the plugin you would like to use in JCB's compiler"
COM_COMPONENTBUILDER_CONFIG_COMPILER_PLUGIN_LABEL="Activate Compiler Plugins"
COM_COMPONENTBUILDER_CONFIG_COMPONENT="Component"
COM_COMPONENTBUILDER_CONFIG_COMPONENT_LABEL="Component"
COM_COMPONENTBUILDER_CONFIG_CRONJOB_BACKUP_FOLDER_PATH_DESCRIPTION="Here you can set the path to where all components are backed up to."
@ -2988,6 +2999,9 @@ COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_DESCRIPTION="Enter website address"
COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_HINT="http://www.example.com"
COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_LABEL="Website"
COM_COMPONENTBUILDER_CONFIG_EXPORT_WEBSITE_MESSAGE="Error! Please add website here."
COM_COMPONENTBUILDER_CONFIG_FALSE="False"
COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_DESCRIPTION="The default option only uses alphabetical characters and converts all numbers in field names to the English equivalent like <em>1</em> becomes <b>one</b>.<br />Alphanumeric keeps the numbers unconverted unless it is at the beginning of the field name.<br />Should you change this it will cause a database updates <i>(during your next compilation)</i> for all fields that has numbers in the name of the field. So it is really not a good idea to change this option every so often, you should rather select what you would like to use and keep it like that.<br />All VDM/JCB components work on the <b>Default</b> option."
COM_COMPONENTBUILDER_CONFIG_FIELD_NAME_BUILDER_LABEL="Field Name Builder<br /><small>(in compiler)</small>"
COM_COMPONENTBUILDER_CONFIG_FLAT_LOAD="Flat"
COM_COMPONENTBUILDER_CONFIG_FOLDER_PATHS="Folder Paths"
COM_COMPONENTBUILDER_CONFIG_FORCE_LOAD="Force"
@ -3003,6 +3017,8 @@ COM_COMPONENTBUILDER_CONFIG_GLOBAL_DESC="The Global Parameters"
COM_COMPONENTBUILDER_CONFIG_GLOBAL_LABEL="Global"
COM_COMPONENTBUILDER_CONFIG_GRADIANT_LOAD="Gradient"
COM_COMPONENTBUILDER_CONFIG_INACTIVE="Inactive"
COM_COMPONENTBUILDER_CONFIG_INSTALL_DESCRIPTION="Component locally"
COM_COMPONENTBUILDER_CONFIG_INSTALL_LABEL="Install"
COM_COMPONENTBUILDER_CONFIG_JCB_COMMUNITY_PACKAGES="JCB Community Packages"
COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_DESCRIPTION="Here you can manage what package directories show in the JCB package import area."
COM_COMPONENTBUILDER_CONFIG_JCB_PACKAGE_DIRECTORIES_LABEL="Directories"
@ -3125,6 +3141,7 @@ COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_DESCRIPTION="How long should th
COM_COMPONENTBUILDER_CONFIG_STORAGE_TIME_TO_LIVE_LABEL="Update Cycle"
COM_COMPONENTBUILDER_CONFIG_STRING_MANIPULATION="String Manipulation"
COM_COMPONENTBUILDER_CONFIG_TLS="TLS"
COM_COMPONENTBUILDER_CONFIG_TRUE="True"
COM_COMPONENTBUILDER_CONFIG_UIKIT_DESC="<b>The Parameters for the uikit are set here.</b><br />Uikit is a lightweight and modular front-end framework
for developing fast and powerful web interfaces. For more info visit <a href="https://getuikit.com/v2/" target="_blank">https://getuikit.com/v2/</a>"
COM_COMPONENTBUILDER_CONFIG_UIKIT_LABEL="Uikit2 Settings"
@ -3145,7 +3162,7 @@ COM_COMPONENTBUILDER_COPYRIGHT_S="Copyright: %s"
COM_COMPONENTBUILDER_COULD_NOT_CLEAR_THE_TMP_FOLDER="Could not clear the tmp folder!"
COM_COMPONENTBUILDER_CREATE="Create"
COM_COMPONENTBUILDER_CREATE_A_SNIPPET="create a snippet"
COM_COMPONENTBUILDER_CREATE_NEW_S="Create New %s"
COM_COMPONENTBUILDER_CREATE_NEW_S="Create new %s"
COM_COMPONENTBUILDER_CREATE_S_FOR_THIS_S="Create %s for this %s"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEW="Custom Admin View"
COM_COMPONENTBUILDER_CUSTOM_ADMIN_VIEWS="Custom Admin Views"
@ -3792,18 +3809,20 @@ COM_COMPONENTBUILDER_CUSTOM_CODE_NOTE_PLACEHOLDERS_EXPLAINED_DESCRIPTION="<div c
<div id='before-usedin'>Soon as enough data is available we will display all the areas where this code is used.</div>
<div id='usedin-a' style='display: none;'><h2>Components</h2><div id='area-a'></div></div>
<div id='usedin-b' style='display:none;'><h2>Component Dashboard</h2><div id='area-b'></div></div>
<div id='usedin-c' style='display:none;'><h2>Admin Views</h2><div id='area-c'></div></div>
<div id='usedin-d' style='display:none;'><h2>Admin Fields Relations</h2><div id='area-d'></div></div>
<div id='usedin-e' style='display:none;'><h2>Custom Admin Views</h2><div id='area-e'></div></div>
<div id='usedin-f' style='display:none;'><h2>Site Views</h2><div id='area-f'></div></div>
<div id='usedin-g' style='display:none;'><h2>Fields</h2><div id='area-g'></div></div>
<div id='usedin-h' style='display:none;'><h2>Fieldtypes</h2><div id='area-h'></div></div>
<div id='usedin-i' style='display:none;'><h2>Dynamic Gets</h2><div id='area-i'></div></div>
<div id='usedin-j' style='display:none;'><h2>Templates</h2><div id='area-j'></div></div>
<div id='usedin-k' style='display:none;'><h2>Layouts</h2><div id='area-k'></div></div>
<div id='usedin-l' style='display:none;'><h2>Libraries</h2><div id='area-l'></div></div>
<div id='usedin-m' style='display:none;'><h2>Custom Code</h2><div id='area-m'></div></div>
<div id='usedin-n' style='display:none;'><h2>Validation Rule</h2><div id='area-n'></div></div>
<div id='usedin-c' style='display:none;'><h2>Component Placeholders</h2><div id='area-c'></div></div>
<div id='usedin-d' style='display:none;'><h2>Admin Views</h2><div id='area-d'></div></div>
<div id='usedin-e' style='display:none;'><h2>Admin Fields Relations</h2><div id='area-e'></div></div>
<div id='usedin-f' style='display:none;'><h2>Admin Custom Tabs</h2><div id='area-f'></div></div>
<div id='usedin-g' style='display:none;'><h2>Custom Admin Views</h2><div id='area-g'></div></div>
<div id='usedin-h' style='display:none;'><h2>Site Views</h2><div id='area-h'></div></div>
<div id='usedin-i' style='display:none;'><h2>Fields</h2><div id='area-i'></div></div>
<div id='usedin-j' style='display:none;'><h2>Fieldtypes</h2><div id='area-j'></div></div>
<div id='usedin-k' style='display:none;'><h2>Dynamic Gets</h2><div id='area-k'></div></div>
<div id='usedin-l' style='display:none;'><h2>Templates</h2><div id='area-l'></div></div>
<div id='usedin-m' style='display:none;'><h2>Layouts</h2><div id='area-m'></div></div>
<div id='usedin-n' style='display:none;'><h2>Libraries</h2><div id='area-n'></div></div>
<div id='usedin-o' style='display:none;'><h2>Custom Code</h2><div id='area-o'></div></div>
<div id='usedin-p' style='display:none;'><h2>Validation Rule</h2><div id='area-p'></div></div>
<div id='loading-usedin' style='display: none;'><h2>Scanning Database<span class='loading-dots'>..</span></h2></div>
<div id='note-usedin-found' style='display: none;'><small>You can edit the above areas where this code is used.</small></div>
<div id='note-usedin-not' style='display: none;'><small>This code is not used in any area of the JCB custom code blocks at this time.</small></div>
@ -4011,7 +4030,7 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_FILTER_TYPE_DESCRIPTION="The type of filter you
COM_COMPONENTBUILDER_DYNAMIC_GET_FILTER_TYPE_LABEL="Filter Type"
COM_COMPONENTBUILDER_DYNAMIC_GET_FUNCTIONVAR="FunctionVar"
COM_COMPONENTBUILDER_DYNAMIC_GET_G="g"
COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM="Getcustom"
COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM="getCustom"
COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOMS="getCustoms"
COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM_DESCRIPTION="Set the Method name for this dynamic get."
COM_COMPONENTBUILDER_DYNAMIC_GET_GETCUSTOM_HINT="getMethodName"
@ -4079,10 +4098,10 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_MODIFIED_DATE_LABEL="Modified Date"
COM_COMPONENTBUILDER_DYNAMIC_GET_MULTIPLE="Multiple"
COM_COMPONENTBUILDER_DYNAMIC_GET_N="n"
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME="Name"
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_DESCRIPTION="The variable name."
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_HINT="variableName"
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_DESCRIPTION="Enter Name Here"
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_HINT="Name Here"
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_LABEL="Name"
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_MESSAGE="Error! Please add variable name here."
COM_COMPONENTBUILDER_DYNAMIC_GET_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_DYNAMIC_GET_NEW="A New Dynamic Get"
COM_COMPONENTBUILDER_DYNAMIC_GET_NN="nn"
COM_COMPONENTBUILDER_DYNAMIC_GET_NO="No"
@ -4182,7 +4201,7 @@ COM_COMPONENTBUILDER_DYNAMIC_GET_TAGS="Tags"
COM_COMPONENTBUILDER_DYNAMIC_GET_THIS="This"
COM_COMPONENTBUILDER_DYNAMIC_GET_TT="tt"
COM_COMPONENTBUILDER_DYNAMIC_GET_TWEAK="Tweak"
COM_COMPONENTBUILDER_DYNAMIC_GET_TYPE_LABEL="Set Type"
COM_COMPONENTBUILDER_DYNAMIC_GET_TYPE_LABEL="Type"
COM_COMPONENTBUILDER_DYNAMIC_GET_U="u"
COM_COMPONENTBUILDER_DYNAMIC_GET_USER="User"
COM_COMPONENTBUILDER_DYNAMIC_GET_USER_GROUPS="User Groups"
@ -4860,7 +4879,7 @@ COM_COMPONENTBUILDER_HELP_DOCUMENT_TITLE_MESSAGE="Error! Please add title here."
COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE="Type"
COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE_DESCRIPTION="Select the help type."
COM_COMPONENTBUILDER_HELP_DOCUMENT_TYPE_LABEL="Type"
COM_COMPONENTBUILDER_HELP_DOCUMENT_URL="Url"
COM_COMPONENTBUILDER_HELP_DOCUMENT_URL="URL"
COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_DESCRIPTION="Enter url"
COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_HINT="http://www.example.com"
COM_COMPONENTBUILDER_HELP_DOCUMENT_URL_LABEL="URL"
@ -4931,7 +4950,7 @@ COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_SNIPPETS="Select the file to import
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_TEMPLATES="Select the file to import data to templates."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_FOR_VALIDATION_RULES="Select the file to import data to validation_rules."
COM_COMPONENTBUILDER_IMPORT_SELECT_FILE_URL="Enter file URL"
COM_COMPONENTBUILDER_IMPORT_SUCCESS="Great! Import successful."
COM_COMPONENTBUILDER_IMPORT_SUCCESS="Import Success!"
COM_COMPONENTBUILDER_IMPORT_TABLE_COLUMNS="Table Columns"
COM_COMPONENTBUILDER_IMPORT_TITLE="Data Importer"
COM_COMPONENTBUILDER_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE="Package to import not found."
@ -5153,10 +5172,10 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC_BUILD_BETA="Dynamic Build (beta)"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_DYNAMIC_INTEGRATION="Dynamic Integration"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EDIT="Editing the Joomla Component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL="Email"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_DESCRIPTION="Enter Email"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_HINT="demo@example.com"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL="Email"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_MESSAGE="Error! Please add email address here."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_DESCRIPTION="Enter Author Email"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_HINT="Author Email Here"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_LABEL="Author Email"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMAIL_MESSAGE="Error! Please author email address here."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS="Emptycontributors"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_DESCRIPTION="Set if a list of empty contributor fields should be added."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_EMPTYCONTRIBUTORS_LABEL="Empty Contributor Fields"
@ -5220,9 +5239,9 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_HINT="codename"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_LABEL="Name in Code"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_CODE_MESSAGE="Error! Please add name in code here."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_DESCRIPTION="Enter Name Here"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_HINT="Component Name"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_HINT="Name Here"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_LABEL="Name"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_MESSAGE="Error! Please add component name here."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NAME_MESSAGE="Error! Please add name here."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NEW="A New Joomla Component"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NO="No"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NONE="None"
@ -5236,10 +5255,9 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_DESCRIPTION="
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_BUILDCOMP_DYNAMIC_MYSQL_LABEL="Dynamic Builder (mySql) Option"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_COMPONENT_FILES_FOLDERS_DESCRIPTION="You can add custom files and folders to the component, simply add the files to the administrator/components/com_componentbuilder/custom folder and then select them here.<span id='jform_button_component_files_folders'></span>"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_COMPONENT_FILES_FOLDERS_LABEL="Adding Custom Files & Folder"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_CROWDIN_DESCRIPTION="
<div class='alert alert-warning'>
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_NOTE_CROWDIN_DESCRIPTION="<div class='alert alert-warning'>
<h4>Feature not ready?</h4>
<p>We are still working on this integration, so it is not fully ready. Hopefully with the next update.</p>
<p>We are still working on this integration, so it is not fully ready.</p>
</div>
<div id='crowdin_information_box'>
<div class='alert alert-info'>
@ -5443,7 +5461,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE="Website"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_DESCRIPTION="Enter website address"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_HINT="http://www.example.com"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL="Website"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_LABEL="Author Website"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WEBSITE_MESSAGE="Error! Please add website here."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK="Whmcs Buy Link"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_BUY_LINK_DESCRIPTION="Enter link where your WHMCS License key can be bought."
@ -5463,6 +5481,7 @@ COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_LABEL="URL to your WHMCS install
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_WHMCS_URL_MESSAGE="Error! Please add website here."
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_YES="Yes"
COM_COMPONENTBUILDER_JOOMLA_COMPONENT_ZIP="ZIP"
COM_COMPONENTBUILDER_JOOMLA_FIELDS="Joomla fields"
COM_COMPONENTBUILDER_JUST_GET_ALL_SNIPPETS="Just Get All Snippets"
COM_COMPONENTBUILDER_KEEP_HISTORY="Keep History"
COM_COMPONENTBUILDER_KEEP_ORIGINAL_ACCESS="- Keep Original Access -"
@ -5621,7 +5640,7 @@ COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_STATUS="Status"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION="Translation"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_DESCRIPTION="The translation strings."
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_HINT="Translated String Here"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_LABEL="Translated String"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_LABEL="Translation"
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_TRANSLATION_MESSAGE="Error! Please add translated string here."
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_VERSION_DESC="A count of the number of times this Language Translation has been revised."
COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_VERSION_LABEL="Revision"
@ -5747,7 +5766,7 @@ COM_COMPONENTBUILDER_LAYOUT_VERSION_LABEL="Revision"
COM_COMPONENTBUILDER_LAYOUT_YES="Yes"
COM_COMPONENTBUILDER_LEFT_IN_TAB="Left in Tab"
COM_COMPONENTBUILDER_LEFT_OF_TABS="Left of Tabs"
COM_COMPONENTBUILDER_LIBRARIES="Libraries"
COM_COMPONENTBUILDER_LIBRARIES="libraries"
COM_COMPONENTBUILDER_LIBRARIES_ACCESS="Libraries Access"
COM_COMPONENTBUILDER_LIBRARIES_ACCESS_DESC="Allows the users in this group to access access libraries"
COM_COMPONENTBUILDER_LIBRARIES_BATCH_OPTIONS="Batch process the selected Libraries"
@ -5876,7 +5895,7 @@ COM_COMPONENTBUILDER_LIBRARY_ANY_SELECTION_ONLY_FOUR_LISTRADIOCHECKBOXESDYNAMIC_
COM_COMPONENTBUILDER_LIBRARY_BEHAVIOUR="Behaviour"
COM_COMPONENTBUILDER_LIBRARY_BUNDLE="Bundle"
COM_COMPONENTBUILDER_LIBRARY_CHAIN="Chain"
COM_COMPONENTBUILDER_LIBRARY_CONFIG="Library Config"
COM_COMPONENTBUILDER_LIBRARY_CONFIG="Config"
COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG="Addconfig"
COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG_DESCRIPTION="Setup config fields."
COM_COMPONENTBUILDER_LIBRARY_CONFIG_ADDCONFIG_LABEL="Config"
@ -5929,7 +5948,7 @@ COM_COMPONENTBUILDER_LIBRARY_EXCLUDE="exclude"
COM_COMPONENTBUILDER_LIBRARY_FIELD_OPTIONS_HINT="Options here"
COM_COMPONENTBUILDER_LIBRARY_FIELD_OPTIONS_LABEL="Field Options"
COM_COMPONENTBUILDER_LIBRARY_FILE="File"
COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS="Library Files, Folders & URLs"
COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS="Files, Folders & URLs"
COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILES="Addfiles"
COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILESFULLPATH="Addfilesfullpath"
COM_COMPONENTBUILDER_LIBRARY_FILES_FOLDERS_URLS_ADDFILESFULLPATH_DESCRIPTION="Add files to this component using the full path."
@ -6162,7 +6181,7 @@ COM_COMPONENTBUILDER_NONE_DB="None DB"
COM_COMPONENTBUILDER_NONE_SELECTED="None selected"
COM_COMPONENTBUILDER_NOTICE_BOARD="Notice Board"
COM_COMPONENTBUILDER_NOTRANSLATION="no-translation"
COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!"
COM_COMPONENTBUILDER_NOT_FOUND_OR_ACCESS_DENIED="Not found, or access denied."
COM_COMPONENTBUILDER_NOT_SET="not set"
COM_COMPONENTBUILDER_NO_ACCESS_GRANTED="No Access Granted!"
COM_COMPONENTBUILDER_NO_COMPONENTS_WERE_SELECTED_PLEASE_MAKE_A_SELECTION_AND_TRY_AGAIN="No components were selected, please make a selection and try again!"
@ -6275,18 +6294,20 @@ COM_COMPONENTBUILDER_PLACEHOLDER_NOTE_PLACEHOLDERS_PLACEDIN_DESCRIPTION="<div cl
<div id='before-placedin'>Soon as enough data is available we will display all the areas where this placeholder is used.</div>
<div id='placedin-a' style='display: none;'><h2>Components</h2><div id='area-a'></div></div>
<div id='placedin-b' style='display:none;'><h2>Component Dashboard</h2><div id='area-b'></div></div>
<div id='placedin-c' style='display:none;'><h2>Admin Views</h2><div id='area-c'></div></div>
<div id='placedin-d' style='display:none;'><h2>Admin Fields Relations</h2><div id='area-d'></div></div>
<div id='placedin-e' style='display:none;'><h2>Custom Admin Views</h2><div id='area-e'></div></div>
<div id='placedin-f' style='display:none;'><h2>Site Views</h2><div id='area-f'></div></div>
<div id='placedin-g' style='display:none;'><h2>Fields</h2><div id='area-g'></div></div>
<div id='placedin-h' style='display:none;'><h2>Fieldtypes</h2><div id='area-h'></div></div>
<div id='placedin-i' style='display:none;'><h2>Dynamic Gets</h2><div id='area-i'></div></div>
<div id='placedin-j' style='display:none;'><h2>Templates</h2><div id='area-j'></div></div>
<div id='placedin-k' style='display:none;'><h2>Layouts</h2><div id='area-k'></div></div>
<div id='placedin-l' style='display:none;'><h2>Libraries</h2><div id='area-l'></div></div>
<div id='placedin-m' style='display:none;'><h2>Custom Code</h2><div id='area-m'></div></div>
<div id='placedin-n' style='display:none;'><h2>Validation Rule</h2><div id='area-n'></div></div>
<div id='placedin-c' style='display:none;'><h2>Component Placeholders</h2><div id='area-c'></div></div>
<div id='placedin-d' style='display:none;'><h2>Admin Views</h2><div id='area-d'></div></div>
<div id='placedin-e' style='display:none;'><h2>Admin Fields Relations</h2><div id='area-e'></div></div>
<div id='placedin-f' style='display:none;'><h2>Admin Custom Tabs</h2><div id='area-f'></div></div>
<div id='placedin-g' style='display:none;'><h2>Custom Admin Views</h2><div id='area-g'></div></div>
<div id='placedin-h' style='display:none;'><h2>Site Views</h2><div id='area-h'></div></div>
<div id='placedin-i' style='display:none;'><h2>Fields</h2><div id='area-i'></div></div>
<div id='placedin-j' style='display:none;'><h2>Fieldtypes</h2><div id='area-j'></div></div>
<div id='placedin-k' style='display:none;'><h2>Dynamic Gets</h2><div id='area-k'></div></div>
<div id='placedin-l' style='display:none;'><h2>Templates</h2><div id='area-l'></div></div>
<div id='placedin-m' style='display:none;'><h2>Layouts</h2><div id='area-m'></div></div>
<div id='placedin-n' style='display:none;'><h2>Libraries</h2><div id='area-n'></div></div>
<div id='placedin-o' style='display:none;'><h2>Custom Code</h2><div id='area-o'></div></div>
<div id='placedin-p' style='display:none;'><h2>Validation Rule</h2><div id='area-p'></div></div>
<div id='loading-placedin' style='display: none;'><h2>Scanning Database<span class='loading-dots'>..</span></h2></div>
<div id='note-placedin-found' style='display: none;'><small>You can edit the above areas where this placeholder is used.</small></div>
<div id='note-placedin-not' style='display: none;'><small>This placeholder is not used in any area of the JCB custom code blocks at this time.</small></div>
@ -7087,7 +7108,7 @@ COM_COMPONENTBUILDER_SNIPPET_SNIPPET="Snippet"
COM_COMPONENTBUILDER_SNIPPET_SNIPPET_HINT="// Add the snippets code here"
COM_COMPONENTBUILDER_SNIPPET_SNIPPET_LABEL="Snippet"
COM_COMPONENTBUILDER_SNIPPET_STATUS="Status"
COM_COMPONENTBUILDER_SNIPPET_TYPE="Snippet Type"
COM_COMPONENTBUILDER_SNIPPET_TYPE="Type"
COM_COMPONENTBUILDER_SNIPPET_TYPES="Snippet Types"
COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS="Snippet Types Access"
COM_COMPONENTBUILDER_SNIPPET_TYPES_ACCESS_DESC="Allows the users in this group to access access snippet types"
@ -7128,7 +7149,7 @@ COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_BY_DESC="The user that created this Sn
COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_BY_LABEL="Created By"
COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_DATE_DESC="The date this Snippet Type was created."
COM_COMPONENTBUILDER_SNIPPET_TYPE_CREATED_DATE_LABEL="Created Date"
COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION="Description"
COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION="Snippet Types"
COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_DESCRIPTION="Enter some description"
COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_HINT="Description Here"
COM_COMPONENTBUILDER_SNIPPET_TYPE_DESCRIPTION_LABEL="Description"

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'admin_view'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'tabs'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'admin_view'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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_on_views',
'addfields'
);
@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'admin_view'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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_on_conditions',
'addconditions'
);
@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'admin_view'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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_on_relations',
'addrelations'
);
@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'add_css_view',
'css_view',
'add_css_views',
@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'php_controller',
'php_model',
'php_controller_list',
@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'add_custom_button',
'custom_button'
);
@ -22,9 +33,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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_beginner_import',
'note_advanced_import',
'add_custom_import',
@ -30,6 +41,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -38,3 +50,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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_linked_to_notice'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'name_single',
'name_list',
'type',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'short_description',
'description',
'add_fadein'
@ -23,9 +34,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'not_required'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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_create_edit_display'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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_create_edit_notice',
'alias_builder_type',
'note_alias_builder_custom',
@ -25,9 +36,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,18 +12,31 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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_create_edit_buttons'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'add_javascript_view_file',
'javascript_view_file',
'add_javascript_view_footer',
@ -28,6 +39,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -36,3 +48,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'sql'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'mysql_table_engine',
'mysql_table_charset',
'mysql_table_collate',
@ -27,9 +38,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'add_php_ajax',
'php_ajaxmethod',
'ajax_input',
@ -38,6 +49,10 @@ $fields = $displayData->get('fields') ?: array(
'php_allowadd',
'add_php_allowedit',
'php_allowedit',
'add_php_before_cancel',
'php_before_cancel',
'add_php_after_cancel',
'php_after_cancel',
'add_php_batchcopy',
'php_batchcopy',
'add_php_batchmove',
@ -57,6 +72,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -65,3 +81,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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_on_permissions',
'addpermissions',
'note_on_tabs',
@ -27,6 +38,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -35,3 +47,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'joomla_component'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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_on_admin_views',
'addadmin_views'
);
@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'joomla_component'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'addconfig'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'joomla_component'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'addcustommenus'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'joomla_component'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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_on_custom_admin_views',
'addcustom_admin_views'
);
@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'joomla_component'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'php_dashboard_methods',
'dashboard_tab'
);
@ -22,6 +33,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -30,3 +42,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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_add_files_fullpath',
'addfilesfullpath',
'note_add_folders_fullpath',
@ -25,6 +36,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -33,3 +45,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'joomla_component'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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_add_files',
'addfiles',
'note_add_folders',
@ -24,6 +35,7 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -32,3 +44,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'joomla_component'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'sql_tweak'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'joomla_component'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-inline form-inline-header">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,15 +12,27 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'addplaceholders'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?php if ($fields && count((array) $fields)) :?>
<div class="form-vertical">
<?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?>
@ -29,3 +41,4 @@ $hiddenFields = $displayData->get('hidden_fields') ?: array();
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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(
'created',
'created_by',
'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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

@ -12,9 +12,20 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
// 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',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array();
?>
<?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; ?>

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