Stable release of v4.0.0-alpha1
First alpha release of Component Builder towards Joomla 4 (very unstable...).
This commit is contained in:
@ -3,8 +3,8 @@
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
|
||||
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
||||
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
@ -17,27 +17,32 @@ defined('_JEXEC') or die('Restricted access');
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\MVC\Model\ListModel;
|
||||
use Joomla\CMS\Component\ComponentHelper;
|
||||
|
||||
/**
|
||||
* ###Component### Ajax Model
|
||||
*/
|
||||
class ###Component###ModelAjax extends JModelList
|
||||
class ###Component###ModelAjax extends ListModel
|
||||
{
|
||||
protected $app_params;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
{
|
||||
parent::__construct();
|
||||
// get params
|
||||
$this->app_params = JComponentHelper::getParams('com_###component###');
|
||||
$this->app_params = ComponentHelper::getParams('com_###component###');
|
||||
}
|
||||
|
||||
public function setFieldRequired($name,$form,$status)
|
||||
{
|
||||
// get the session
|
||||
$session = JFactory::getSession();
|
||||
$session = Factory::getSession();
|
||||
// get this forms set fields
|
||||
$fields = $session->get($form.'_requiredFieldFix');
|
||||
if(###Component###Helper::checkArray($fields))
|
||||
if(Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($fields))
|
||||
{
|
||||
if ($status == 1)
|
||||
{
|
||||
@ -45,7 +50,7 @@ class ###Component###ModelAjax extends JModelList
|
||||
$fields = array_unique($fields);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
// remove from array
|
||||
if(($key = array_search($name, $fields)) !== false)
|
||||
{
|
||||
@ -61,7 +66,7 @@ class ###Component###ModelAjax extends JModelList
|
||||
}
|
||||
}
|
||||
// load the remaining values to session
|
||||
if(###Component###Helper::checkArray($fields))
|
||||
if(Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($fields))
|
||||
{
|
||||
$session->set($form.'_requiredFieldFix', $fields);
|
||||
}
|
||||
|
Reference in New Issue
Block a user