Added context to all compiler events. Added layout fields override options for dynamic field generation.

This commit is contained in:
Llewellyn van der Merwe 2019-07-01 18:10:28 +02:00
parent 663f8405e5
commit b9c758b800
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
291 changed files with 4951 additions and 370 deletions

View File

@ -146,11 +146,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 29th June, 2019 + *Last Build*: 1st July, 2019
+ *Version*: 2.9.20 + *Version*: 2.9.20
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **206973** + *Line count*: **211430**
+ *Field count*: **1142** + *Field count*: **1142**
+ *File count*: **1346** + *File count*: **1346**
+ *Folder count*: **209** + *Folder count*: **209**

View File

@ -146,11 +146,11 @@ TODO
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
+ *First Build*: 30th April, 2015 + *First Build*: 30th April, 2015
+ *Last Build*: 29th June, 2019 + *Last Build*: 1st July, 2019
+ *Version*: 2.9.20 + *Version*: 2.9.20
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved. + *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt + *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **206973** + *Line count*: **211430**
+ *Field count*: **1142** + *Field count*: **1142**
+ *File count*: **1346** + *File count*: **1346**
+ *Folder count*: **209** + *Folder count*: **209**

View File

@ -23,13 +23,20 @@ use Joomla\Registry\Registry;
* ###Component### ###View### Model * ###Component### ###View### Model
*/ */
class ###Component###Model###View### extends JModelAdmin 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. * @var string The prefix to use with controller messages.
* @since 1.6 * @since 1.6
*/ */
protected $text_prefix = 'COM_###COMPONENT###'; protected $text_prefix = 'COM_###COMPONENT###';
/** /**
* The type alias for this content type. * The type alias for this content type.
* *

View File

@ -23,13 +23,20 @@ use Joomla\Registry\Registry;
* ###Component### ###View### Model * ###Component### ###View### Model
*/ */
class ###Component###Model###View### extends JModelAdmin 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. * @var string The prefix to use with controller messages.
* @since 1.6 * @since 1.6
*/ */
protected $text_prefix = 'COM_###COMPONENT###'; protected $text_prefix = 'COM_###COMPONENT###';
/** /**
* The type alias for this content type. * The type alias for this content type.
* *

View File

@ -29,18 +29,31 @@ defined('_JEXEC') or die('Restricted access');
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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### ###LAYOUTITEMS###
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

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

View File

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

View File

@ -254,7 +254,7 @@ class Compiler extends Infusion
protected function setFileContent(&$name, &$path, &$bom, $view = null) protected function setFileContent(&$name, &$path, &$bom, $view = null)
{ {
// Trigger Event: jcb_ce_onBeforeSetFileContent // Trigger Event: jcb_ce_onBeforeSetFileContent
$this->triggerEvent('jcb_ce_onBeforeSetFileContent', array(&$name, &$path, &$bom, &$view)); $this->triggerEvent('jcb_ce_onBeforeSetFileContent', array(&$this->componentContext, &$name, &$path, &$bom, &$view));
// set the file name // set the file name
$this->fileContentStatic[$this->hhh . 'FILENAME' . $this->hhh] = $name; $this->fileContentStatic[$this->hhh . 'FILENAME' . $this->hhh] = $name;
// check if the file should get PHP opening // check if the file should get PHP opening
@ -266,7 +266,7 @@ class Compiler extends Infusion
// get content of the file // get content of the file
$string = ComponentbuilderHelper::getFileContents($path); $string = ComponentbuilderHelper::getFileContents($path);
// Trigger Event: jcb_ce_onGetFileContents // Trigger Event: jcb_ce_onGetFileContents
$this->triggerEvent('jcb_ce_onGetFileContents', array(&$string, &$name, &$path, &$bom, &$view)); $this->triggerEvent('jcb_ce_onGetFileContents', array(&$this->componentContext, &$string, &$name, &$path, &$bom, &$view));
// see if we should add a BOM // see if we should add a BOM
if (strpos($string, $this->hhh . 'BOM' . $this->hhh) !== false) if (strpos($string, $this->hhh . 'BOM' . $this->hhh) !== false)
{ {
@ -286,7 +286,7 @@ class Compiler extends Infusion
$answer = $this->setDynamicValues($answer); $answer = $this->setDynamicValues($answer);
} }
// Trigger Event: jcb_ce_onBeforeSetFileContent // Trigger Event: jcb_ce_onBeforeSetFileContent
$this->triggerEvent('jcb_ce_onBeforeWriteFileContent', array(&$answer, &$name, &$path, &$bom, &$view)); $this->triggerEvent('jcb_ce_onBeforeWriteFileContent', array(&$this->componentContext, &$answer, &$name, &$path, &$bom, &$view));
// add answer back to file // add answer back to file
$this->writeFile($path, $answer); $this->writeFile($path, $answer);
// count the file lines // count the file lines

View File

@ -800,6 +800,8 @@ class Get
$this->langPrefix = 'COM_' . ComponentbuilderHelper::safeString($name_code, 'U'); $this->langPrefix = 'COM_' . ComponentbuilderHelper::safeString($name_code, 'U');
// set component code name // set component code name
$this->componentCodeName = ComponentbuilderHelper::safeString($name_code); $this->componentCodeName = ComponentbuilderHelper::safeString($name_code);
// set component context
$this->componentContext = $this->componentCodeName . '.' . $this->componentID;
// set if placeholders should be added to customcode // set if placeholders should be added to customcode
$global = ((int) ComponentbuilderHelper::getVar('joomla_component', $this->componentID, 'id', 'add_placeholders') == 1) ? true : false; $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); $this->addPlaceholders = ((int) $config['placeholders'] == 0) ? false : (((int) $config['placeholders'] == 1) ? true : $global);
@ -1020,7 +1022,7 @@ class Get
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $this->componentID); $query->where($this->db->quoteName('a.id') . ' = ' . (int) $this->componentID);
// Trigger Event: jcb_ce_onBeforeQueryComponentData // Trigger Event: jcb_ce_onBeforeQueryComponentData
$this->triggerEvent('jcb_ce_onBeforeQueryComponentData', array(&$this->componentID, &$query, &$this->db)); $this->triggerEvent('jcb_ce_onBeforeQueryComponentData', array(&$this->componentContext, &$this->componentID, &$query, &$this->db));
// Reset the query using our newly populated query object. // Reset the query using our newly populated query object.
$this->db->setQuery($query); $this->db->setQuery($query);
@ -1029,7 +1031,7 @@ class Get
$component = $this->db->loadObject(); $component = $this->db->loadObject();
// Trigger Event: jcb_ce_onBeforeModelComponentData // Trigger Event: jcb_ce_onBeforeModelComponentData
$this->triggerEvent('jcb_ce_onBeforeModelComponentData', array(&$component)); $this->triggerEvent('jcb_ce_onBeforeModelComponentData', array(&$this->componentContext, &$component));
// set upater // set upater
$updater = array( $updater = array(
@ -1573,7 +1575,7 @@ class Get
} }
// Trigger Event: jcb_ce_onAfterModelComponentData // Trigger Event: jcb_ce_onAfterModelComponentData
$this->triggerEvent('jcb_ce_onAfterModelComponentData', array(&$component)); $this->triggerEvent('jcb_ce_onAfterModelComponentData', array(&$this->componentContext, &$component));
// return the found component data // return the found component data
return $component; return $component;
@ -1622,7 +1624,7 @@ class Get
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id); $query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
// Trigger Event: jcb_ce_onBeforeQueryViewData // Trigger Event: jcb_ce_onBeforeQueryViewData
$this->triggerEvent('jcb_ce_onBeforeQueryViewData', array(&$id, &$query, &$this->db)); $this->triggerEvent('jcb_ce_onBeforeQueryViewData', array(&$this->componentContext, &$id, &$query, &$this->db));
// Reset the query using our newly populated query object. // Reset the query using our newly populated query object.
$this->db->setQuery($query); $this->db->setQuery($query);
@ -1681,7 +1683,7 @@ class Get
$this->placeholders[$this->bbb . 'VIEWS' . $this->ddd] = $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh]; $this->placeholders[$this->bbb . 'VIEWS' . $this->ddd] = $this->placeholders[$this->hhh . 'VIEWS' . $this->hhh];
// Trigger Event: jcb_ce_onBeforeModelViewData // Trigger Event: jcb_ce_onBeforeModelViewData
$this->triggerEvent('jcb_ce_onBeforeModelViewData', array(&$view, &$this->placeholders)); $this->triggerEvent('jcb_ce_onBeforeModelViewData', array(&$this->componentContext, &$view, &$this->placeholders));
// add the tables // add the tables
$view->addtables = (isset($view->addtables) && ComponentbuilderHelper::checkJson($view->addtables)) ? json_decode($view->addtables, true) : null; $view->addtables = (isset($view->addtables) && ComponentbuilderHelper::checkJson($view->addtables)) ? json_decode($view->addtables, true) : null;
@ -2279,7 +2281,7 @@ class Get
} }
// Trigger Event: jcb_ce_onAfterModelViewData // Trigger Event: jcb_ce_onAfterModelViewData
$this->triggerEvent('jcb_ce_onAfterModelViewData', array(&$view, &$this->placeholders)); $this->triggerEvent('jcb_ce_onAfterModelViewData', array(&$this->componentContext, &$view, &$this->placeholders));
// clear placeholders // clear placeholders
unset($this->placeholders[$this->hhh . 'view' . $this->hhh]); unset($this->placeholders[$this->hhh . 'view' . $this->hhh]);
@ -2321,7 +2323,7 @@ class Get
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id); $query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
// Trigger Event: jcb_ce_onBeforeQueryCustomViewData // Trigger Event: jcb_ce_onBeforeQueryCustomViewData
$this->triggerEvent('jcb_ce_onBeforeQueryCustomViewData', array(&$id, &$table, &$query, &$this->db)); $this->triggerEvent('jcb_ce_onBeforeQueryCustomViewData', array(&$this->componentContext, &$id, &$table, &$query, &$this->db));
// Reset the query using our newly populated query object. // Reset the query using our newly populated query object.
$this->db->setQuery($query); $this->db->setQuery($query);
@ -2330,7 +2332,7 @@ class Get
$view = $this->db->loadObject(); $view = $this->db->loadObject();
// Trigger Event: jcb_ce_onBeforeModelCustomViewData // Trigger Event: jcb_ce_onBeforeModelCustomViewData
$this->triggerEvent('jcb_ce_onBeforeModelCustomViewData', array(&$view, &$id, &$table)); $this->triggerEvent('jcb_ce_onBeforeModelCustomViewData', array(&$this->componentContext, &$view, &$id, &$table));
if ($table === 'site_view') if ($table === 'site_view')
{ {
@ -2570,7 +2572,7 @@ class Get
} }
// Trigger Event: jcb_ce_onAfterModelCustomViewData // Trigger Event: jcb_ce_onAfterModelCustomViewData
$this->triggerEvent('jcb_ce_onAfterModelCustomViewData', array(&$view)); $this->triggerEvent('jcb_ce_onAfterModelCustomViewData', array(&$this->componentContext, &$view));
// return the found view data // return the found view data
return $view; return $view;
@ -2601,7 +2603,7 @@ class Get
$query->where($this->db->quoteName('a.id') . ' = ' . $this->db->quote($id)); $query->where($this->db->quoteName('a.id') . ' = ' . $this->db->quote($id));
// Trigger Event: jcb_ce_onBeforeQueryFieldData // Trigger Event: jcb_ce_onBeforeQueryFieldData
$this->triggerEvent('jcb_ce_onBeforeQueryFieldData', array(&$id, &$query, &$this->db)); $this->triggerEvent('jcb_ce_onBeforeQueryFieldData', array(&$this->componentContext, &$id, &$query, &$this->db));
// Reset the query using our newly populated query object. // Reset the query using our newly populated query object.
$this->db->setQuery($query); $this->db->setQuery($query);
@ -2612,7 +2614,7 @@ class Get
$field = $this->db->loadObject(); $field = $this->db->loadObject();
// Trigger Event: jcb_ce_onBeforeModelFieldData // Trigger Event: jcb_ce_onBeforeModelFieldData
$this->triggerEvent('jcb_ce_onBeforeModelFieldData', array(&$field)); $this->triggerEvent('jcb_ce_onBeforeModelFieldData', array(&$this->componentContext, &$field));
// adding a fix for the changed name of type to fieldtype // adding a fix for the changed name of type to fieldtype
$field->type = $field->fieldtype; $field->type = $field->fieldtype;
@ -2690,7 +2692,7 @@ class Get
$field->history = $this->getHistoryWatch('field', $id); $field->history = $this->getHistoryWatch('field', $id);
// Trigger Event: jcb_ce_onAfterModelFieldData // Trigger Event: jcb_ce_onAfterModelFieldData
$this->triggerEvent('jcb_ce_onAfterModelFieldData', array(&$field)); $this->triggerEvent('jcb_ce_onAfterModelFieldData', array(&$this->componentContext, &$field));
$this->_fieldData[$id] = $field; $this->_fieldData[$id] = $field;
} }

View File

@ -368,7 +368,7 @@ class Structure extends Get
// set the Joomla Version Data // set the Joomla Version Data
$this->joomlaVersionData = $this->setJoomlaVersionData(); $this->joomlaVersionData = $this->setJoomlaVersionData();
// Trigger Event: jcb_ce_onAfterSetJoomlaVersionData // Trigger Event: jcb_ce_onAfterSetJoomlaVersionData
$this->triggerEvent('jcb_ce_onAfterSetJoomlaVersionData', array(&$this->joomlaVersionData)); $this->triggerEvent('jcb_ce_onAfterSetJoomlaVersionData', array(&$this->componentContext, &$this->joomlaVersionData));
// set the dashboard // set the dashboard
$this->setDynamicDashboard(); $this->setDynamicDashboard();
// set the new folders // set the new folders
@ -419,7 +419,7 @@ class Structure extends Get
if (ComponentbuilderHelper::checkArray($this->libraries)) if (ComponentbuilderHelper::checkArray($this->libraries))
{ {
// Trigger Event: jcb_ce_onBeforeSetLibaries // Trigger Event: jcb_ce_onBeforeSetLibaries
$this->triggerEvent('jcb_ce_onBeforeSetLibaries', array(&$this->libraries)); $this->triggerEvent('jcb_ce_onBeforeSetLibaries', array(&$this->componentContext, &$this->libraries));
// creat the main component folder // creat the main component folder
if (!JFolder::exists($this->componentPath)) if (!JFolder::exists($this->componentPath))
{ {

View File

@ -457,14 +457,14 @@ class Fields extends Structure
// set the custom table key // set the custom table key
$dbkey = 'g'; $dbkey = 'g';
// Trigger Event: jcb_ce_onBeforeBuildFields // Trigger Event: jcb_ce_onBeforeBuildFields
$this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews)); $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 // TODO we should add the global and local view switch if field for front end
foreach ($view['settings']->fields as $field) 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); $dynamicFields .= $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true);
} }
// Trigger Event: jcb_ce_onAfterBuildFields // Trigger Event: jcb_ce_onAfterBuildFields
$this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$dynamicFields, &$readOnly, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews)); $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 // set the default fields
$fieldSet = array(); $fieldSet = array();
$fieldSet[] = '<fieldset name="details">'; $fieldSet[] = '<fieldset name="details">';
@ -729,14 +729,14 @@ class Fields extends Structure
// set the custom table key // set the custom table key
$dbkey = 'g'; $dbkey = 'g';
// Trigger Event: jcb_ce_onBeforeBuildFields // Trigger Event: jcb_ce_onBeforeBuildFields
$this->triggerEvent('jcb_ce_onBeforeBuildFields', array(&$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews)); $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 // TODO we should add the global and local view switch if field for front end
foreach ($view['settings']->fields as $field) 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); $dynamicFieldsXML[] = $this->setDynamicField($field, $view, $view['settings']->type, $langView, $view_name_single, $view_name_list, $this->placeholders, $dbkey, true);
} }
// Trigger Event: jcb_ce_onAfterBuildFields // Trigger Event: jcb_ce_onAfterBuildFields
$this->triggerEvent('jcb_ce_onAfterBuildFields', array(&$dynamicFieldsXML, &$readOnlyXML, &$dbkey, &$view, &$component, &$view_name_single, &$view_name_list, &$this->placeholders, &$langView, &$langViews)); $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 // set the default fields
$XML = new simpleXMLElement('<a/>'); $XML = new simpleXMLElement('<a/>');
$fieldSetXML = $XML->addChild('fieldset'); $fieldSetXML = $XML->addChild('fieldset');
@ -2013,7 +2013,7 @@ class Fields extends Structure
{ {
$this->layoutBuilder[$view_name_single][$tabName][(int) $field['alignment']][(int) $field['order_edit']] = $name; $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)) if (in_array($name, $this->defaultFields))
{ {
// just to eliminate // just to eliminate
@ -2055,7 +2055,7 @@ class Fields extends Structure
{ {
$this->layoutBuilder[$view_name_single]['Details'][(int) $field['alignment']][(int) $field['order_edit']] = $name; $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)) if (in_array($name, $this->defaultFields))
{ {
// just to eliminate // just to eliminate

View File

@ -6539,7 +6539,7 @@ class Interpretation extends Fields
// add final list of needed lang strings // add final list of needed lang strings
$componentName = JFilterOutput::cleanText($this->componentData->name); $componentName = JFilterOutput::cleanText($this->componentData->name);
// Trigger Event: jcb_ce_onBeforeBuildAdminLang // Trigger Event: jcb_ce_onBeforeBuildAdminLang
$this->triggerEvent('jcb_ce_onBeforeBuildAdminLang', array(&$this->langContent['admin'], &$this->langPrefix, &$componentName)); $this->triggerEvent('jcb_ce_onBeforeBuildAdminLang', array(&$this->componentContext, &$this->langContent['admin'], &$this->langPrefix, &$componentName));
// start loding the defaults // start loding the defaults
$this->langContent['adminsys'][$this->langPrefix] = $componentName; $this->langContent['adminsys'][$this->langPrefix] = $componentName;
$this->langContent['adminsys'][$this->langPrefix . '_CONFIGURATION'] = $componentName . ' Configuration'; $this->langContent['adminsys'][$this->langPrefix . '_CONFIGURATION'] = $componentName . ' Configuration';
@ -6631,7 +6631,7 @@ class Interpretation extends Fields
if (isset($this->langContent['admin']) && ComponentbuilderHelper::checkArray($this->langContent['admin'])) if (isset($this->langContent['admin']) && ComponentbuilderHelper::checkArray($this->langContent['admin']))
{ {
// Trigger Event: jcb_ce_onAfterBuildAdminLang // Trigger Event: jcb_ce_onAfterBuildAdminLang
$this->triggerEvent('jcb_ce_onAfterBuildAdminLang', array(&$this->langContent['admin'], &$this->langPrefix, &$componentName)); $this->triggerEvent('jcb_ce_onAfterBuildAdminLang', array(&$this->componentContext, &$this->langContent['admin'], &$this->langPrefix, &$componentName));
// sort the strings // sort the strings
ksort($this->langContent['admin']); ksort($this->langContent['admin']);
// load to global languages // load to global languages
@ -6649,7 +6649,7 @@ class Interpretation extends Fields
// add final list of needed lang strings // add final list of needed lang strings
$componentName = JFilterOutput::cleanText($this->componentData->name); $componentName = JFilterOutput::cleanText($this->componentData->name);
// Trigger Event: jcb_ce_onBeforeBuildSiteLang // Trigger Event: jcb_ce_onBeforeBuildSiteLang
$this->triggerEvent('jcb_ce_onBeforeBuildSiteLang', array(&$this->langContent['site'], &$this->langPrefix, &$componentName)); $this->triggerEvent('jcb_ce_onBeforeBuildSiteLang', array(&$this->componentContext, &$this->langContent['site'], &$this->langPrefix, &$componentName));
// add final list of needed lang strings // add final list of needed lang strings
$this->langContent['site'][$this->langPrefix] = $componentName; $this->langContent['site'][$this->langPrefix] = $componentName;
// some more defaults // some more defaults
@ -6691,7 +6691,7 @@ class Interpretation extends Fields
if (isset($this->langContent['site']) && ComponentbuilderHelper::checkArray($this->langContent['site'])) if (isset($this->langContent['site']) && ComponentbuilderHelper::checkArray($this->langContent['site']))
{ {
// Trigger Event: jcb_ce_onAfterBuildSiteLang // Trigger Event: jcb_ce_onAfterBuildSiteLang
$this->triggerEvent('jcb_ce_onAfterBuildSiteLang', array(&$this->langContent['site'], &$this->langPrefix, &$componentName)); $this->triggerEvent('jcb_ce_onAfterBuildSiteLang', array(&$this->componentContext, &$this->langContent['site'], &$this->langPrefix, &$componentName));
// sort the strings // sort the strings
ksort($this->langContent['site']); ksort($this->langContent['site']);
// load to global languages // load to global languages
@ -6709,7 +6709,7 @@ class Interpretation extends Fields
// add final list of needed lang strings // add final list of needed lang strings
$componentName = JFilterOutput::cleanText($this->componentData->name); $componentName = JFilterOutput::cleanText($this->componentData->name);
// Trigger Event: jcb_ce_onBeforeBuildSiteSysLang // Trigger Event: jcb_ce_onBeforeBuildSiteSysLang
$this->triggerEvent('jcb_ce_onBeforeBuildSiteSysLang', array(&$this->langContent['sitesys'], &$this->langPrefix, &$componentName)); $this->triggerEvent('jcb_ce_onBeforeBuildSiteSysLang', array(&$this->componentContext, &$this->langContent['sitesys'], &$this->langPrefix, &$componentName));
// add final list of needed lang strings // add final list of needed lang strings
$this->langContent['sitesys'][$this->langPrefix] = $componentName; $this->langContent['sitesys'][$this->langPrefix] = $componentName;
$this->langContent['sitesys'][$this->langPrefix . '_NO_ACCESS_GRANTED'] = "No Access Granted!"; $this->langContent['sitesys'][$this->langPrefix . '_NO_ACCESS_GRANTED'] = "No Access Granted!";
@ -6726,7 +6726,7 @@ class Interpretation extends Fields
if (isset($this->langContent['sitesys']) && ComponentbuilderHelper::checkArray($this->langContent['sitesys'])) if (isset($this->langContent['sitesys']) && ComponentbuilderHelper::checkArray($this->langContent['sitesys']))
{ {
// Trigger Event: jcb_ce_onAfterBuildSiteSysLang // Trigger Event: jcb_ce_onAfterBuildSiteSysLang
$this->triggerEvent('jcb_ce_onAfterBuildSiteSysLang', array(&$this->langContent['sitesys'], &$this->langPrefix, &$componentName)); $this->triggerEvent('jcb_ce_onAfterBuildSiteSysLang', array(&$this->componentContext, &$this->langContent['sitesys'], &$this->langPrefix, &$componentName));
// sort strings // sort strings
ksort($this->langContent['sitesys']); ksort($this->langContent['sitesys']);
// load to global languages // load to global languages
@ -6744,7 +6744,7 @@ class Interpretation extends Fields
// add final list of needed lang strings // add final list of needed lang strings
$componentName = JFilterOutput::cleanText($this->componentData->name); $componentName = JFilterOutput::cleanText($this->componentData->name);
// Trigger Event: jcb_ce_onBeforeBuildAdminSysLang // Trigger Event: jcb_ce_onBeforeBuildAdminSysLang
$this->triggerEvent('jcb_ce_onBeforeBuildAdminSysLang', array(&$this->langContent['adminsys'], &$this->langPrefix, &$componentName)); $this->triggerEvent('jcb_ce_onBeforeBuildAdminSysLang', array(&$this->componentContext, &$this->langContent['adminsys'], &$this->langPrefix, &$componentName));
// check if the both admin array is set // check if the both admin array is set
if (isset($this->langContent['bothadmin']) && ComponentbuilderHelper::checkArray($this->langContent['bothadmin'])) if (isset($this->langContent['bothadmin']) && ComponentbuilderHelper::checkArray($this->langContent['bothadmin']))
{ {
@ -6756,7 +6756,7 @@ class Interpretation extends Fields
if (isset($this->langContent['adminsys']) && ComponentbuilderHelper::checkArray($this->langContent['adminsys'])) if (isset($this->langContent['adminsys']) && ComponentbuilderHelper::checkArray($this->langContent['adminsys']))
{ {
// Trigger Event: jcb_ce_onAfterBuildAdminSysLang // Trigger Event: jcb_ce_onAfterBuildAdminSysLang
$this->triggerEvent('jcb_ce_onAfterBuildAdminSysLang', array(&$this->langContent['adminsys'], &$this->langPrefix, &$componentName)); $this->triggerEvent('jcb_ce_onAfterBuildAdminSysLang', array(&$this->componentContext, &$this->langContent['adminsys'], &$this->langPrefix, &$componentName));
// sort strings // sort strings
ksort($this->langContent['adminsys']); ksort($this->langContent['adminsys']);
// load to global languages // load to global languages
@ -7482,6 +7482,46 @@ class Interpretation extends Fields
return ''; return '';
} }
/**
* set Tabs Layouts Fields Array
*
* @param string $view_name_single The single view name
*
* @return string The array
*
*/
public function getTabLayoutFieldsArray($view_name_single)
{
// check if the load build is set for this view
if (isset($this->layoutBuilder[$view_name_single]) && ComponentbuilderHelper::checkArray($this->layoutBuilder[$view_name_single]))
{
$layoutArray = array();
foreach ($this->layoutBuilder[$view_name_single] as $layout => $alignments)
{
// sort the alignments
ksort($alignments);
$alignmentArray= array();
foreach ($alignments as $alignment => $fields)
{
// sort the fields
ksort($fields);
$fieldArray= array();
foreach ($fields as $field)
{
// add each field
$fieldArray[] = PHP_EOL . $this->_t(4) . "'" . $field . "'";
}
// add the alignemnt key
$alignmentArray[] = PHP_EOL . $this->_t(3) . "'" . $this->alignmentOptions[$alignment] . "' => array(" . implode(',', $fieldArray) . PHP_EOL . $this->_t(3) . ")";
}
// add the layout key
$layoutArray[] = PHP_EOL . $this->_t(2) . "'" . ComponentbuilderHelper::safeString($layout) . "' => array(" . implode(',', $alignmentArray) . PHP_EOL . $this->_t(2) . ")";
}
return 'array(' . implode(',', $layoutArray) . PHP_EOL . $this->_t(1) . ")";
}
return 'array()';
}
/** /**
* set Edit Body * set Edit Body
* *
@ -14022,7 +14062,7 @@ class Interpretation extends Fields
// set the custom table key // set the custom table key
$dbkey = 'g'; $dbkey = 'g';
// Trigger Event: jcb_ce_onBeforeSetConfigFieldsets // Trigger Event: jcb_ce_onBeforeSetConfigFieldsets
$this->triggerEvent('jcb_ce_onBeforeSetConfigFieldsets', array(&$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$placeholders)); $this->triggerEvent('jcb_ce_onBeforeSetConfigFieldsets', array(&$this->componentContext, &$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$placeholders));
// build the config fields // build the config fields
foreach ($this->componentData->config as $field) foreach ($this->componentData->config as $field)
{ {
@ -14078,7 +14118,7 @@ class Interpretation extends Fields
elseif (2 == $timer) // this is after the admin views are build elseif (2 == $timer) // this is after the admin views are build
{ {
// Trigger Event: jcb_ce_onBeforeSetConfigFieldsets // Trigger Event: jcb_ce_onBeforeSetConfigFieldsets
$this->triggerEvent('jcb_ce_onBeforeSetConfigFieldsets', array(&$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$this->placeholders)); $this->triggerEvent('jcb_ce_onBeforeSetConfigFieldsets', array(&$this->componentContext, &$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->componentData->config, &$this->extensionsParams, &$this->placeholders));
// these field sets can only be added after admin view is build // these field sets can only be added after admin view is build
$this->setGroupControlConfigFieldsets($lang); $this->setGroupControlConfigFieldsets($lang);
// these can be added anytime really (but looks best after groups // these can be added anytime really (but looks best after groups
@ -14090,7 +14130,7 @@ class Interpretation extends Fields
$this->setCustomControlConfigFieldsets($lang); $this->setCustomControlConfigFieldsets($lang);
} }
// Trigger Event: jcb_ce_onAfterSetConfigFieldsets // Trigger Event: jcb_ce_onAfterSetConfigFieldsets
$this->triggerEvent('jcb_ce_onAfterSetConfigFieldsets', array(&$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->extensionsParams, &$this->frontEndParams, &$this->placeholders)); $this->triggerEvent('jcb_ce_onAfterSetConfigFieldsets', array(&$this->componentContext, &$timer, &$this->configFieldSets, &$this->configFieldSetsCustomField, &$this->extensionsParams, &$this->frontEndParams, &$this->placeholders));
} }
public function setSiteControlConfigFieldsets($lang) public function setSiteControlConfigFieldsets($lang)

View File

@ -69,7 +69,7 @@ class Infusion extends Interpretation
if (isset($this->componentData->admin_views) && ComponentbuilderHelper::checkArray($this->componentData->admin_views)) if (isset($this->componentData->admin_views) && ComponentbuilderHelper::checkArray($this->componentData->admin_views))
{ {
// Trigger Event: jcb_ce_onBeforeBuildFilesContent // Trigger Event: jcb_ce_onBeforeBuildFilesContent
$this->triggerEvent('jcb_ce_onBeforeBuildFilesContent', array(&$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh)); $this->triggerEvent('jcb_ce_onBeforeBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
// COMPONENT // COMPONENT
$this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] = $this->placeholders[$this->hhh . 'COMPONENT' . $this->hhh]; $this->fileContentStatic[$this->hhh . 'COMPONENT' . $this->hhh] = $this->placeholders[$this->hhh . 'COMPONENT' . $this->hhh];
@ -276,7 +276,7 @@ class Infusion extends Interpretation
$this->setLockLicensePer($viewName_list, $this->target); $this->setLockLicensePer($viewName_list, $this->target);
// Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent // Trigger Event: jcb_ce_onBeforeBuildAdminEditViewContent
$this->triggerEvent('jcb_ce_onBeforeBuildAdminEditViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh)); $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>>> // FIELDSETS <<<DYNAMIC>>>
$this->fileContentDynamic[$viewName_single][$this->hhh . 'FIELDSETS' . $this->hhh] = $this->setFieldSet($view, $this->componentCodeName, $viewName_single, $viewName_list); $this->fileContentDynamic[$viewName_single][$this->hhh . 'FIELDSETS' . $this->hhh] = $this->setFieldSet($view, $this->componentCodeName, $viewName_single, $viewName_list);
@ -377,8 +377,11 @@ class Infusion extends Interpretation
} }
} }
// 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 // Trigger Event: jcb_ce_onAfterBuildAdminEditViewContent
$this->triggerEvent('jcb_ce_onAfterBuildAdminEditViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_single], &$this->placeholders, &$this->hhh)); $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 // set the views names
if (isset($view['settings']->name_list) && $view['settings']->name_list != 'null') if (isset($view['settings']->name_list) && $view['settings']->name_list != 'null')
@ -389,7 +392,7 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$viewName_list][$this->hhh . 'ICOMOON' . $this->hhh] = $view['icomoon']; $this->fileContentDynamic[$viewName_list][$this->hhh . 'ICOMOON' . $this->hhh] = $view['icomoon'];
// Trigger Event: jcb_ce_onBeforeBuildAdminListViewContent // Trigger Event: jcb_ce_onBeforeBuildAdminListViewContent
$this->triggerEvent('jcb_ce_onBeforeBuildAdminListViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh)); $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 // set the export/import option
if (isset($view['port']) && $view['port'] || 1 == $view['settings']->add_custom_import) if (isset($view['port']) && $view['port'] || 1 == $view['settings']->add_custom_import)
@ -522,7 +525,7 @@ class Infusion extends Interpretation
} }
// Trigger Event: jcb_ce_onAfterBuildAdminListViewContent // Trigger Event: jcb_ce_onAfterBuildAdminListViewContent
$this->triggerEvent('jcb_ce_onAfterBuildAdminListViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic[$viewName_list], &$this->placeholders, &$this->hhh)); $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 // set u fields used in batch
@ -605,7 +608,7 @@ class Infusion extends Interpretation
$this->fileContentStatic[$this->hhh . 'HELPER_EXEL' . $this->hhh] = $this->setExelHelperMethods(); $this->fileContentStatic[$this->hhh . 'HELPER_EXEL' . $this->hhh] = $this->setExelHelperMethods();
// Trigger Event: jcb_ce_onAfterBuildAdminViewContent // Trigger Event: jcb_ce_onAfterBuildAdminViewContent
$this->triggerEvent('jcb_ce_onAfterBuildAdminViewContent', array(&$view, &$viewName_single, &$viewName_list, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh)); $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 // setup custom_admin_views and all needed stuff for the site
@ -651,7 +654,7 @@ 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 // Trigger Event: jcb_ce_onBeforeBuildCustomAdminViewContent
$this->triggerEvent('jcb_ce_onBeforeBuildCustomAdminViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh)); $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 // set license per view if needed
$this->setLockLicensePer($view['settings']->code, $this->target); $this->setLockLicensePer($view['settings']->code, $this->target);
@ -705,7 +708,7 @@ class Infusion extends Interpretation
$this->setCustomViewTemplateBody($view); $this->setCustomViewTemplateBody($view);
// Trigger Event: jcb_ce_onAfterBuildCustomAdminViewContent // Trigger Event: jcb_ce_onAfterBuildCustomAdminViewContent
$this->triggerEvent('jcb_ce_onAfterBuildCustomAdminViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh)); $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 // setup the layouts
@ -872,7 +875,7 @@ 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 // Trigger Event: jcb_ce_onBeforeBuildSiteViewContent
$this->triggerEvent('jcb_ce_onBeforeBuildSiteViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh)); $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 // set license per view if needed
$this->setLockLicensePer($view['settings']->code, $this->target); $this->setLockLicensePer($view['settings']->code, $this->target);
@ -956,7 +959,7 @@ class Infusion extends Interpretation
$this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_BOTTOM_FORM' . $this->hhh] = $this->setCustomViewForm($view['settings']->code, 2); $this->fileContentDynamic[$view['settings']->code][$this->hhh . 'SITE_BOTTOM_FORM' . $this->hhh] = $this->setCustomViewForm($view['settings']->code, 2);
// Trigger Event: jcb_ce_onAfterBuildSiteViewContent // Trigger Event: jcb_ce_onAfterBuildSiteViewContent
$this->triggerEvent('jcb_ce_onAfterBuildSiteViewContent', array(&$view, &$view['settings']->code, &$this->fileContentStatic, &$this->fileContentDynamic[$view['settings']->code], &$this->placeholders, &$this->hhh)); $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 // setup the layouts
$this->setCustomViewLayouts(); $this->setCustomViewLayouts();
@ -1042,7 +1045,7 @@ class Infusion extends Interpretation
} }
// Trigger Event: jcb_ce_onAfterBuildFilesContent // Trigger Event: jcb_ce_onAfterBuildFilesContent
$this->triggerEvent('jcb_ce_onAfterBuildFilesContent', array(&$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh)); $this->triggerEvent('jcb_ce_onAfterBuildFilesContent', array(&$this->componentContext, &$this->componentData, &$this->fileContentStatic, &$this->fileContentDynamic, &$this->placeholders, &$this->hhh));
return true; return true;
} }
@ -1172,7 +1175,7 @@ class Infusion extends Interpretation
if (ComponentbuilderHelper::checkArray($this->languages)) if (ComponentbuilderHelper::checkArray($this->languages))
{ {
// Trigger Event: jcb_ce_onBeforeBuildAllLangFiles // Trigger Event: jcb_ce_onBeforeBuildAllLangFiles
$this->triggerEvent('jcb_ce_onBeforeBuildAllLangFiles', array(&$this->languages, &$this->langTag)); $this->triggerEvent('jcb_ce_onBeforeBuildAllLangFiles', array(&$this->componentContext, &$this->languages, &$this->langTag));
// rest xml array // rest xml array
$langXML = array(); $langXML = array();
foreach ($this->languages as $tag => $areas) foreach ($this->languages as $tag => $areas)

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'add_custom_button',
'custom_button' 'custom_button'
); );
@ -22,9 +33,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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_single',
'name_list', 'name_list',
'type', 'type',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'short_description',
'description', 'description',
'add_fadein' 'add_fadein'
@ -23,9 +34,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'note_create_edit_notice',
'alias_builder_type', 'alias_builder_type',
'note_alias_builder_custom', 'note_alias_builder_custom',
@ -25,9 +36,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,18 +12,31 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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' 'note_create_edit_buttons'
); );
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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_engine',
'mysql_table_charset', 'mysql_table_charset',
'mysql_table_collate', 'mysql_table_collate',
@ -27,9 +38,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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',
'created_by', 'created_by',
'modified', 'modified',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'published',
'ordering', 'ordering',
'access', 'access',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'add_custom_button',
'custom_button' 'custom_button'
); );
@ -22,9 +33,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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', 'name',
'codename', 'codename',
'description', 'description',
@ -26,9 +37,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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(
'icon', 'icon',
'snippet', 'snippet',
'note_uikit_snippet', 'note_uikit_snippet',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

@ -12,9 +12,20 @@
// No direct access to this file // No direct access to this file
defined('_JEXEC') or die('Restricted access'); defined('_JEXEC') or die('Restricted access');
// get the form
$form = $displayData->getForm(); $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(
'custom_get', 'custom_get',
'main_get', 'main_get',
'dynamic_get', 'dynamic_get',
@ -24,9 +35,11 @@ $fields = $displayData->get('fields') ?: array(
$hiddenFields = $displayData->get('hidden_fields') ?: array(); $hiddenFields = $displayData->get('hidden_fields') ?: array();
?> ?>
<?php if ($fields && count((array) $fields)) :?>
<?php foreach($fields as $field): ?> <?php foreach($fields as $field): ?>
<?php if (in_array($field, $hiddenFields)) : ?> <?php if (in_array($field, $hiddenFields)) : ?>
<?php $form->setFieldAttribute($field, 'type', 'hidden'); ?> <?php $form->setFieldAttribute($field, 'type', 'hidden'); ?>
<?php endif; ?> <?php endif; ?>
<?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?> <?php echo $form->renderField($field, null, null, array('class' => 'control-wrapper-' . $field)); ?>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?>

View File

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

View File

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

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