Improved the getActions helper method, also added ->params to custom views.

This commit is contained in:
2018-09-19 14:51:59 +02:00
parent 38176365de
commit 2e758308d2
81 changed files with 484 additions and 190 deletions

View File

@ -17,7 +17,7 @@ JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
$componentParams = JComponentHelper::getParams('com_componentbuilder');
$componentParams = $this->params; // will be removed just use $this->params instead
?>
<script type="text/javascript">
// waiting spinner

View File

@ -23,13 +23,15 @@ class ComponentbuilderViewCustom_code extends JViewLegacy
*/
public function display($tpl = null)
{
// set params
$this->params = JComponentHelper::getParams('com_componentbuilder');
// Assign the variables
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->script = $this->get('Script');
$this->state = $this->get('State');
// get action permissions
$this->canDo = ComponentbuilderHelper::getActions('custom_code',$this->item);
$this->canDo = ComponentbuilderHelper::getActions('custom_code', $this->item);
// get input
$jinput = JFactory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');