Release of v6.1.2
Add Joomla 6 build option. Fix the template and layout linker for packages. Add native module builder for Joomla 4/5. Refactor dynamic get methods into dedicated classes. Move Joomla DB handling into compiler injector flow. Fix auto-check(in) method for Joomla 4/5 compatibility. Migrates view HTML classes to use getModel() directly instead of the deprecated magic get() calls to model methods. Refactores event handling (contentPrepare, titlePrepare, contentBeforeDisplay, contentAfterDisplay) to use Joomla 5's native event dispatcher via the model's new getDispatcher() method. Updates table classes to properly support NULL values, both in the store() method and in table variable definitions. #1245. Extractes the setAutoCheckIn() and setCheckInCall() logic into a dedicated CheckInNow class for cleaner design. Replace all direct $app->input property calls with the recommended $app->getInput() method across the entire codebase. Add Joomla 6 build option :). Fix Custom Rule Validation Bug. Unpublish Joomla 6 Backward Compatibility Plugin. Refactors the Compiler Model by dropping deprecated calls and adopting Joomla 5+ conventions. Refactors Compiler Controller to remove deprecated usage and follow Joomla 5+ best practices. Adds check to ensure expert mode subforms in the Demo Component remain set and unchanged when user lacks edit permissions. Improves validation handling of Fields by ensuring field validation rules are properly registered. Replace StringHelper with the correct Super Power key so it loads in the Compiler Controller. Add functionality to add component changelog into the package if configured. Refactor PHP classes for building HTML view files in admin and site views to align with Joomla 5+ standards. Fix issues in the site view HtmlView caused by the refactor, including missing class calls and outdated function references. Fix issue where the DatabaseSchemaCheckAll pulled all Component Builder tables into DB on install. #1253. Fix issue in the Dynamic Get when the value key is 0 it wouldn't add the 'WHERE' statement to the generated code. #1254. Change radio buttons with a empty option to save Datatype CHAR instead of TINYINT as other radio buttons. #1252. Add extra xml details to Modules built with JCB that adds advance options to the module. #1248. Remove setDocumentTitle method from the admin view since it is not being used by Joomla. #1255. Refactor compiler Move file update to classes. Refactor compiler Move plugin and module fields and rules files mover to classes. Fix issue where custom powers was not added to PowerloaderHelper. #1256. Fix normalization issue when compiling on Windows systems. #1219. Fix installer issue on Joomla 6 where components containing multiple plugins failed during installation. Completely refactors the Compiler Dashboard to align with Joomla 5+ architecture and Bootstrap 5 standards. Add a default VARCHAR(36) length to easily create fields intended to store GUID values. Update the file uploader in the Demo Component for more dynamic file display and naming. Update the SQL file dump generator to handle large SQL dumps in batches, ensuring safe and reliable database imports. Update example hints in the field expert mode options.
This commit is contained in:
747 files changed
+57518
-19469
No files matched your search
@@ -62,7 +62,7 @@ class ###Component###Model###SView### extends ItemModel
|
||||
protected function populateState()
|
||||
{
|
||||
$this->app = Factory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->input = method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input;
|
||||
// Get the item main id
|
||||
$id = $this->input->getInt('id', null);
|
||||
$this->setState('###sview###.id', $id);
|
||||
|
||||
@@ -62,7 +62,7 @@ class ###Component###Model###SView### extends ItemModel
|
||||
protected function populateState()
|
||||
{
|
||||
$this->app = Factory::getApplication();
|
||||
$this->input = $this->app->input;
|
||||
$this->input = method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input;
|
||||
// Get the itme main id
|
||||
$id = $this->input->getInt('id', null);
|
||||
$this->setState('###sview###.id', $id);
|
||||
|
||||
@@ -50,9 +50,10 @@ class ###Component###Model###Views### extends ListModel
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input;
|
||||
|
||||
// Adjust the context to support modal layouts.
|
||||
if ($layout = $app->input->get('layout'))
|
||||
if ($layout = $input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}###POPULATESTATE###
|
||||
|
||||
@@ -24,6 +24,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
*/
|
||||
class ###Component###Model###Component### extends ListModel
|
||||
{
|
||||
###DASHBOARDICONACCESS###
|
||||
public function getIcons()
|
||||
{
|
||||
// load user for access menus
|
||||
@@ -33,7 +34,8 @@ class ###Component###Model###Component### extends ListModel
|
||||
// view groups array
|
||||
$viewGroups = array(
|
||||
'main' => array(###DASHBOARDICONS###)
|
||||
);###DASHBOARDICONACCESS###
|
||||
);
|
||||
$viewAccess = $this->viewAccess;
|
||||
// loop over the $views
|
||||
foreach($viewGroups as $group => $views)
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ class AjaxController extends BaseController
|
||||
// get the user for later use
|
||||
$user = $this->app->getIdentity();
|
||||
// get the input values
|
||||
$jinput = $this->input ?? $this->app->input;
|
||||
$jinput = $this->input ?? (method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input);
|
||||
// check if we should return raw (DEFAULT TRUE SINCE J4)
|
||||
$returnRaw = $jinput->get('raw', true, 'BOOLEAN');
|
||||
// return to a callback function
|
||||
|
||||
@@ -41,8 +41,9 @@ class HelpController extends BaseController
|
||||
|
||||
public function help()
|
||||
{
|
||||
$user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();
|
||||
$jinput = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input;
|
||||
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
$user = $app->getIdentity();
|
||||
$jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input;
|
||||
// Check Token!
|
||||
$token = Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken();
|
||||
$call_token = $jinput->get('token', 0, 'ALNUM');
|
||||
|
||||
@@ -90,7 +90,8 @@ class ImportModel extends BaseDatabaseModel
|
||||
$package = null;
|
||||
$continue = false;
|
||||
// get import type
|
||||
$this->getType = $app->input->getString('gettype', NULL);
|
||||
$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input;
|
||||
$this->getType = $input->getString('gettype', NULL);
|
||||
// get import type
|
||||
$this->dataType = $session->get('dataType_VDM_IMPORTINTO', NULL);
|
||||
|
||||
@@ -196,7 +197,7 @@ class ImportModel extends BaseDatabaseModel
|
||||
{
|
||||
// Get the uploaded file information
|
||||
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
$input = $app->input;
|
||||
$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input;
|
||||
|
||||
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
|
||||
$userfile = $input->files->get('import_package', null, 'raw');
|
||||
@@ -256,7 +257,7 @@ class ImportModel extends BaseDatabaseModel
|
||||
protected function _getPackageFromFolder()
|
||||
{
|
||||
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
$input = $app->input;
|
||||
$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input;
|
||||
|
||||
// Get the path to the package to import
|
||||
$p_dir = $input->getString('import_directory');
|
||||
@@ -301,7 +302,7 @@ class ImportModel extends BaseDatabaseModel
|
||||
protected function _getPackageFromUrl()
|
||||
{
|
||||
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
$input = $app->input;
|
||||
$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input;
|
||||
|
||||
// Get the URL of the package to import
|
||||
$url = $input->getString('import_url');
|
||||
|
||||
@@ -86,7 +86,7 @@ class ###View###importModel extends BaseDatabaseModel
|
||||
{
|
||||
// Get the uploaded file information
|
||||
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
$input = $app->input;
|
||||
$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input;
|
||||
|
||||
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
|
||||
$userfile = $input->files->get('import_package', null, 'raw');
|
||||
@@ -146,7 +146,7 @@ class ###View###importModel extends BaseDatabaseModel
|
||||
protected function _getPackageFromFolder()
|
||||
{
|
||||
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
$input = $app->input;
|
||||
$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input;
|
||||
|
||||
// Get the path to the package to import
|
||||
$p_dir = $input->getString('import_directory');
|
||||
@@ -191,7 +191,7 @@ class ###View###importModel extends BaseDatabaseModel
|
||||
protected function _getPackageFromUrl()
|
||||
{
|
||||
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
$input = $app->input;
|
||||
$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input;
|
||||
|
||||
// Get the URL of the package to import
|
||||
$url = $input->getString('import_url');
|
||||
|
||||
@@ -92,6 +92,14 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
public bool $isModal;
|
||||
|
||||
/**
|
||||
* The empty state
|
||||
*
|
||||
* @var bool
|
||||
* @since 5.2.1
|
||||
*/
|
||||
protected bool $isEmptyState;
|
||||
|
||||
/**
|
||||
* The user object.
|
||||
*
|
||||
@@ -111,12 +119,13 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
$this->pagination = $this->get('Pagination');
|
||||
$this->state = $this->get('State');
|
||||
$this->styles = $this->get('Styles');
|
||||
$this->scripts = $this->get('Scripts');
|
||||
// Load module values
|
||||
$model = $this->getModel();
|
||||
$this->items = $model->getItems();
|
||||
$this->pagination = $model->getPagination();
|
||||
$this->state = $model->getState();
|
||||
$this->styles = $model->getStyles();
|
||||
$this->scripts = $model->getScripts();
|
||||
$this->user ??= $this->getCurrentUser();###ADMIN_DIPLAY_METHOD###
|
||||
$this->saveOrder = $this->listOrder == 'a.ordering';
|
||||
// set the return here value
|
||||
@@ -125,7 +134,7 @@ class HtmlView extends BaseHtmlView
|
||||
$this->canDo = ###Component###Helper::getActions('###view###');###JVIEWLISTCANDO###
|
||||
|
||||
// If we don't have items we load the empty state
|
||||
if (is_array($this->items) && !count((array) $this->items) && $this->isEmptyState = $this->get('IsEmptyState'))
|
||||
if (is_array($this->items) && !count((array) $this->items) && $this->isEmptyState = $model->getIsEmptyState())
|
||||
{
|
||||
$this->setLayout('emptystate');
|
||||
}
|
||||
@@ -218,7 +227,6 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
protected function _prepareDocument(): void
|
||||
{###JQUERY###
|
||||
$this->getDocument()->setTitle(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###VIEWS###'));
|
||||
// add styles
|
||||
foreach ($this->styles as $style)
|
||||
{
|
||||
|
||||
@@ -23,12 +23,14 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED###
|
||||
|
||||
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
|
||||
if ($app->isClient('site')) {
|
||||
if ($app->isClient('site'))
|
||||
{
|
||||
Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken('get') or die(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JINVALID_TOKEN'));
|
||||
}
|
||||
|
||||
// dynamic selection of title key (link in modal)
|
||||
$this->modalTitleKey = $app->input->get('titleKey', 'id', 'word');
|
||||
$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input;
|
||||
$this->modalTitleKey = $input->get('titleKey', 'id', 'word');
|
||||
|
||||
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
|
||||
$wa = $this->getDocument()->getWebAssetManager();
|
||||
|
||||
@@ -93,9 +93,10 @@ class ###Views###Model extends ListModel
|
||||
protected function populateState($ordering = null, $direction = null)
|
||||
{
|
||||
$app = $this->app;
|
||||
$input = $this->app->getInput();
|
||||
|
||||
// Adjust the context to support modal layouts.
|
||||
if ($layout = $app->input->get('layout'))
|
||||
if ($layout = $input->get('layout'))
|
||||
{
|
||||
$this->context .= '.' . $layout;
|
||||
}###POPULATESTATE###
|
||||
|
||||
@@ -29,12 +29,12 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
* The item from the model
|
||||
* The app class
|
||||
*
|
||||
* @var mixed
|
||||
* @since 3.10.11
|
||||
* @var Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public mixed $item;
|
||||
public Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power $app;
|
||||
|
||||
/**
|
||||
* The input class
|
||||
@@ -44,6 +44,22 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
public Joomla___59106b64_dd51_4280_be0a_1b9b9ebb7161___Power $input;
|
||||
|
||||
/**
|
||||
* The params registry
|
||||
*
|
||||
* @var Joomla___a87c432d_b5b4_428e_b7ff_14b51664c624___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___a87c432d_b5b4_428e_b7ff_14b51664c624___Power $params;
|
||||
|
||||
/**
|
||||
* The item from the model
|
||||
*
|
||||
* @var mixed
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public mixed $item;
|
||||
|
||||
/**
|
||||
* The state object
|
||||
*
|
||||
@@ -135,19 +151,25 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// get application
|
||||
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
// get input
|
||||
$this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input;
|
||||
// set params
|
||||
$this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
|
||||
$this->params ??= method_exists($this->app, 'getParams')
|
||||
? $this->app->getParams()
|
||||
: Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
|
||||
$this->useCoreUI = true;
|
||||
// Assign the variables
|
||||
$this->form ??= $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->styles = $this->get('Styles');
|
||||
$this->scripts = $this->get('Scripts');
|
||||
$this->state = $this->get('State');
|
||||
// Load module values
|
||||
$model = $this->getModel();
|
||||
$this->form ??= $model->getForm();
|
||||
$this->item = $model->getItem();
|
||||
$this->styles = $model->getStyles();
|
||||
$this->scripts = $model->getScripts();
|
||||
$this->state = $model->getState();
|
||||
// get action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###view###', $this->item);
|
||||
// get input
|
||||
$this->input ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input;
|
||||
// get return referral details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
$return = $this->input->get('return', null, 'base64');
|
||||
@@ -219,6 +241,27 @@ class HtmlView extends BaseHtmlView
|
||||
###ADDMODALTOOLBAR###
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare some document related stuff.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function _prepareDocument(): void
|
||||
{###JQUERY###
|
||||
$isNew = ($this->item->id < 1);
|
||||
// add styles
|
||||
foreach ($this->styles as $style)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
|
||||
}###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
|
||||
// add scripts
|
||||
foreach ($this->scripts as $script)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
|
||||
}###DOCUMENT_CUSTOM_PHP###
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
@@ -238,26 +281,4 @@ class HtmlView extends BaseHtmlView
|
||||
|
||||
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset ?? 'UTF-8', $shorten, $length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare some document related stuff.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function _prepareDocument(): void
|
||||
{###JQUERY###
|
||||
$isNew = ($this->item->id < 1);
|
||||
$this->getDocument()->setTitle(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
|
||||
// add styles
|
||||
foreach ($this->styles as $style)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
|
||||
}###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
|
||||
// add scripts
|
||||
foreach ($this->scripts as $script)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
|
||||
}###DOCUMENT_CUSTOM_PHP###
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ class ###View###Table extends Table implements VersionableTableInterface, Taggab
|
||||
$this->_jsonEncode = ['params', 'metadata'];
|
||||
|
||||
// Indicates that columns fully support the NULL value in the database
|
||||
// $this->_supportNullValue = true; // hmmm will keep an eye on this ;)
|
||||
$this->_supportNullValue = true;
|
||||
|
||||
parent::__construct('#__###component###_###view###', 'id', $db, $dispatcher);###LICENSE_LOCKED_CHECK###
|
||||
}
|
||||
@@ -105,7 +105,7 @@ class ###View###Table extends Table implements VersionableTableInterface, Taggab
|
||||
* @return boolean True on success, false on failure.
|
||||
* @since 1.6
|
||||
*/
|
||||
public function store($updateNulls = false)
|
||||
public function store($updateNulls = true)
|
||||
{
|
||||
$date = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getDate()->toSql();
|
||||
$userId = $this->getCurrentUser()->id;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
###CHANGELOG_SERVER_XML###
|
||||
@@ -46,7 +46,7 @@ class ###SViews###Controller extends AdminController
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public function getModel($name = '###View###', $prefix = 'Administrator', $config = ['ignore_request' => true])
|
||||
public function getModel($name = '###SViews###', $prefix = 'Administrator', $config = ['ignore_request' => true])
|
||||
{
|
||||
return parent::getModel($name, $prefix, $config);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,38 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
|
||||
#[\AllowDynamicProperties]
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
* The app class
|
||||
*
|
||||
* @var Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power $app;
|
||||
|
||||
/**
|
||||
* The input class
|
||||
*
|
||||
* @var Joomla___59106b64_dd51_4280_be0a_1b9b9ebb7161___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___59106b64_dd51_4280_be0a_1b9b9ebb7161___Power $input;
|
||||
|
||||
/**
|
||||
* The params registry
|
||||
*
|
||||
* @var Joomla___a87c432d_b5b4_428e_b7ff_14b51664c624___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___a87c432d_b5b4_428e_b7ff_14b51664c624___Power $params;
|
||||
|
||||
/**
|
||||
* The user object.
|
||||
*
|
||||
* @var Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power $user;
|
||||
|
||||
/**
|
||||
* The styles url array
|
||||
*
|
||||
@@ -52,14 +84,6 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
public object $canDo;
|
||||
|
||||
/**
|
||||
* The user object.
|
||||
*
|
||||
* @var Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power $user;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*
|
||||
@@ -71,16 +95,22 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// get component params
|
||||
$this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
|
||||
// get the application
|
||||
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
// get input
|
||||
$this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input;
|
||||
// get component params
|
||||
$this->params ??= method_exists($this->app, 'getParams')
|
||||
? $this->app->getParams()
|
||||
: Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
|
||||
// get the user object
|
||||
$this->user ??= $this->getCurrentUser();
|
||||
// get global action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###sview###');
|
||||
$this->styles = $this->get('Styles') ?? [];
|
||||
$this->scripts = $this->get('Scripts') ?? [];###CUSTOM_ADMIN_DIPLAY_METHOD###
|
||||
// Load module values
|
||||
$model = $this->getModel();
|
||||
$this->styles = $model->getStyles() ?? [];
|
||||
$this->scripts = $model->getScripts() ?? [];###CUSTOM_ADMIN_DIPLAY_METHOD###
|
||||
|
||||
// Set the html view document stuff
|
||||
$this->_prepareDocument();
|
||||
@@ -88,26 +118,6 @@ class HtmlView extends BaseHtmlView
|
||||
parent::display($tpl);
|
||||
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
* Prepare some document related stuff.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function _prepareDocument(): void
|
||||
{###CUSTOM_ADMIN_LIBRARIES_LOADER######CUSTOM_ADMIN_UIKIT_LOADER######CUSTOM_ADMIN_GOOGLECHART_LOADER######CUSTOM_ADMIN_FOOTABLE_LOADER######CUSTOM_ADMIN_DOCUMENT_CUSTOM_PHP###
|
||||
// add styles
|
||||
foreach ($this->styles as $style)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
|
||||
}###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS###
|
||||
// add scripts
|
||||
foreach ($this->scripts as $script)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
|
||||
}###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS###
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
@@ -131,7 +141,27 @@ class HtmlView extends BaseHtmlView
|
||||
{
|
||||
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###');
|
||||
}
|
||||
}###CUSTOM_ADMIN_GET_MODULE###
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare some document related stuff.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function _prepareDocument(): void
|
||||
{###CUSTOM_ADMIN_LIBRARIES_LOADER######CUSTOM_ADMIN_UIKIT_LOADER######CUSTOM_ADMIN_GOOGLECHART_LOADER######CUSTOM_ADMIN_FOOTABLE_LOADER######CUSTOM_ADMIN_DOCUMENT_CUSTOM_PHP###
|
||||
// add styles
|
||||
foreach ($this->styles as $style)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
|
||||
}###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS###
|
||||
// add scripts
|
||||
foreach ($this->scripts as $script)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
|
||||
}###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS###
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
@@ -151,5 +181,5 @@ class HtmlView extends BaseHtmlView
|
||||
}
|
||||
|
||||
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset ?? 'UTF-8', $shorten, $length);
|
||||
}
|
||||
}###CUSTOM_ADMIN_GET_MODULE###
|
||||
}
|
||||
@@ -28,6 +28,54 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
|
||||
#[\AllowDynamicProperties]
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
* The app class
|
||||
*
|
||||
* @var Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power $app;
|
||||
|
||||
/**
|
||||
* The input class
|
||||
*
|
||||
* @var Joomla___59106b64_dd51_4280_be0a_1b9b9ebb7161___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___59106b64_dd51_4280_be0a_1b9b9ebb7161___Power $input;
|
||||
|
||||
/**
|
||||
* The params registry
|
||||
*
|
||||
* @var Joomla___a87c432d_b5b4_428e_b7ff_14b51664c624___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___a87c432d_b5b4_428e_b7ff_14b51664c624___Power $params;
|
||||
|
||||
/**
|
||||
* The user object.
|
||||
*
|
||||
* @var Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power $user;
|
||||
|
||||
/**
|
||||
* The styles url array
|
||||
*
|
||||
* @var array
|
||||
* @since 3.10.11
|
||||
*/
|
||||
protected array $styles;
|
||||
|
||||
/**
|
||||
* The scripts url array
|
||||
*
|
||||
* @var array
|
||||
* @since 3.10.11
|
||||
*/
|
||||
protected array $scripts;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*
|
||||
@@ -39,16 +87,22 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// get component params
|
||||
$this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
|
||||
// get the application
|
||||
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
// get input
|
||||
$this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input;
|
||||
// get component params
|
||||
$this->params ??= method_exists($this->app, 'getParams')
|
||||
? $this->app->getParams()
|
||||
: Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
|
||||
// get the user object
|
||||
$this->user ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();
|
||||
$this->user ??= $this->getCurrentUser();
|
||||
// get global action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###sview###');
|
||||
$this->styles = $this->get('Styles');
|
||||
$this->scripts = $this->get('Scripts');###CUSTOM_ADMIN_DIPLAY_METHOD###
|
||||
// Load module values
|
||||
$model = $this->getModel();
|
||||
$this->styles = $model->getStyles();
|
||||
$this->scripts = $model->getScripts();###CUSTOM_ADMIN_DIPLAY_METHOD###
|
||||
|
||||
// Set the html view document stuff
|
||||
$this->_prepareDocument();
|
||||
@@ -56,26 +110,6 @@ class HtmlView extends BaseHtmlView
|
||||
parent::display($tpl);
|
||||
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
* Prepare some document related stuff.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function _prepareDocument(): void
|
||||
{###CUSTOM_ADMIN_LIBRARIES_LOADER######CUSTOM_ADMIN_DOCUMENT_METADATA######CUSTOM_ADMIN_UIKIT_LOADER######CUSTOM_ADMIN_GOOGLECHART_LOADER######CUSTOM_ADMIN_FOOTABLE_LOADER######CUSTOM_ADMIN_DOCUMENT_CUSTOM_PHP###
|
||||
// add styles
|
||||
foreach ($this->styles as $style)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
|
||||
}###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS###
|
||||
// add scripts
|
||||
foreach ($this->scripts as $script)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
|
||||
}###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS###
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
@@ -109,7 +143,27 @@ class HtmlView extends BaseHtmlView
|
||||
{
|
||||
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###');
|
||||
}
|
||||
}###CUSTOM_ADMIN_GET_MODULE###
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare some document related stuff.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function _prepareDocument(): void
|
||||
{###CUSTOM_ADMIN_LIBRARIES_LOADER######CUSTOM_ADMIN_DOCUMENT_METADATA######CUSTOM_ADMIN_UIKIT_LOADER######CUSTOM_ADMIN_GOOGLECHART_LOADER######CUSTOM_ADMIN_FOOTABLE_LOADER######CUSTOM_ADMIN_DOCUMENT_CUSTOM_PHP###
|
||||
// add styles
|
||||
foreach ($this->styles as $style)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
|
||||
}###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS###
|
||||
// add scripts
|
||||
foreach ($this->scripts as $script)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
|
||||
}###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS###
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
@@ -129,5 +183,5 @@ class HtmlView extends BaseHtmlView
|
||||
}
|
||||
|
||||
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset ?? 'UTF-8', $shorten, $length);
|
||||
}
|
||||
}###CUSTOM_ADMIN_GET_MODULE###
|
||||
}
|
||||
@@ -25,7 +25,7 @@ use Joomla\CMS\Component\ComponentHelper;
|
||||
use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Helper\###Component###Helper;
|
||||
|
||||
// No direct access to this file
|
||||
\defined('JPATH_PLATFORM') or die;
|
||||
\defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* Form Rule (###Name###) class for the Joomla Platform.
|
||||
|
||||
@@ -27,6 +27,30 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\View\###
|
||||
*/
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
* The app class
|
||||
*
|
||||
* @var Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power $app;
|
||||
|
||||
/**
|
||||
* The input class
|
||||
*
|
||||
* @var Joomla___59106b64_dd51_4280_be0a_1b9b9ebb7161___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___59106b64_dd51_4280_be0a_1b9b9ebb7161___Power $input;
|
||||
|
||||
/**
|
||||
* The params registry
|
||||
*
|
||||
* @var Joomla___a87c432d_b5b4_428e_b7ff_14b51664c624___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___a87c432d_b5b4_428e_b7ff_14b51664c624___Power $params;
|
||||
|
||||
/**
|
||||
* The item from the model
|
||||
*
|
||||
@@ -117,22 +141,28 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
{
|
||||
// set params
|
||||
$this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
|
||||
// get the application
|
||||
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
// get input
|
||||
$this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input;
|
||||
// get component params
|
||||
$this->params ??= method_exists($this->app, 'getParams')
|
||||
? $this->app->getParams()
|
||||
: Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
|
||||
$this->useCoreUI = true;
|
||||
// Assign the variables
|
||||
$this->form ??= $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->state = $this->get('State');
|
||||
$this->styles = $this->get('Styles') ?? [];
|
||||
$this->scripts = $this->get('Scripts') ?? [];
|
||||
// Load module values
|
||||
$model = $this->getModel();
|
||||
$this->form ??= $model->getForm();
|
||||
$this->item = $model->getItem();
|
||||
$this->state = $model->getState();
|
||||
$this->styles = $model->getStyles() ?? [];
|
||||
$this->scripts = $model->getScripts() ?? [];
|
||||
// get action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###view###', $this->item);
|
||||
// get input
|
||||
$jinput = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input;
|
||||
$this->ref = $jinput->get('ref', 0, 'word');
|
||||
$this->refid = $jinput->get('refid', 0, 'int');
|
||||
$return = $jinput->get('return', null, 'base64');
|
||||
// get return referral details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
$return = $this->input->get('return', null, 'base64');
|
||||
// set the referral string
|
||||
$this->referral = '';
|
||||
if ($this->refid && $this->ref)
|
||||
@@ -179,7 +209,29 @@ class HtmlView extends BaseHtmlView
|
||||
###ADDTOOLBAR###
|
||||
|
||||
// add the toolbar if it's not already loaded
|
||||
$this->toolbar ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(Joomla___5d2ae99b_1ea1_44f0_9b59_f1aa7eab9e2e___Power::class)->createToolbar('toolbar');
|
||||
$this->toolbar ??= $this->getDocument()->getToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare some document related stuff.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function _prepareDocument(): void
|
||||
{###JQUERY###
|
||||
$isNew = ($this->item->id < 1);
|
||||
$this->setDocumentTitle(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
|
||||
// add styles
|
||||
foreach ($this->styles as $style)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
|
||||
}###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
|
||||
// add scripts
|
||||
foreach ($this->scripts as $script)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
|
||||
}###DOCUMENT_CUSTOM_PHP###
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -201,26 +253,4 @@ class HtmlView extends BaseHtmlView
|
||||
|
||||
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset ?? 'UTF-8', $shorten, $length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare some document related stuff.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function _prepareDocument(): void
|
||||
{###JQUERY###
|
||||
$isNew = ($this->item->id < 1);
|
||||
$this->getDocument()->setTitle(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
|
||||
// add styles
|
||||
foreach ($this->styles as $style)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
|
||||
}###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
|
||||
// add scripts
|
||||
foreach ($this->scripts as $script)
|
||||
{
|
||||
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
|
||||
}###DOCUMENT_CUSTOM_PHP###
|
||||
}
|
||||
}
|
||||
@@ -449,8 +449,9 @@ class ###View###Model extends AdminModel
|
||||
*/
|
||||
public function save($data)
|
||||
{
|
||||
$input = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input;
|
||||
$filter = InputFilter::getInstance();
|
||||
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
$input = method_exists($app, 'getInput') ? $app->getInput() : $app->input;
|
||||
$filter = Joomla___193deb3e_0c3e_4610_8e55_450e463095b4___Power::getInstance();
|
||||
|
||||
// set the metadata to the Item Data
|
||||
if (isset($data['metadata']) && isset($data['metadata']['author']))
|
||||
|
||||
@@ -61,7 +61,7 @@ class AjaxController extends BaseController
|
||||
// get the user for later use
|
||||
$user = $this->app->getIdentity();
|
||||
// get the input values
|
||||
$jinput = $this->input ?? $this->app->input;
|
||||
$jinput = $this->input ?? (method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input);
|
||||
// check if we should return raw (DEFAULT TRUE SINCE J4)
|
||||
$returnRaw = $jinput->get('raw', true, 'BOOLEAN');
|
||||
// return to a callback function
|
||||
|
||||
@@ -41,8 +41,9 @@ class HelpController extends BaseController
|
||||
|
||||
public function help()
|
||||
{
|
||||
$user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();
|
||||
$jinput = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input;
|
||||
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
$user = $app->getIdentity();
|
||||
$jinput = method_exists($app, 'getInput') ? $app->getInput() : $app->input;
|
||||
// Check Token!
|
||||
$token = Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken();
|
||||
$call_token = $jinput->get('token', 0, 'ALNUM');
|
||||
|
||||
@@ -27,6 +27,38 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\View\###
|
||||
*/
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
* The app class
|
||||
*
|
||||
* @var Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power $app;
|
||||
|
||||
/**
|
||||
* The input class
|
||||
*
|
||||
* @var Joomla___59106b64_dd51_4280_be0a_1b9b9ebb7161___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___59106b64_dd51_4280_be0a_1b9b9ebb7161___Power $input;
|
||||
|
||||
/**
|
||||
* The params registry
|
||||
*
|
||||
* @var Joomla___a87c432d_b5b4_428e_b7ff_14b51664c624___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___a87c432d_b5b4_428e_b7ff_14b51664c624___Power $params;
|
||||
|
||||
/**
|
||||
* The user object.
|
||||
*
|
||||
* @var Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power $user;
|
||||
|
||||
/**
|
||||
* The items from the model
|
||||
*
|
||||
@@ -67,14 +99,6 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
public object $canDo;
|
||||
|
||||
/**
|
||||
* The user object.
|
||||
*
|
||||
* @var Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power $user;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*
|
||||
@@ -86,18 +110,45 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// get combined params of both component and menu
|
||||
// get application
|
||||
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
$this->params = $this->app->getParams();
|
||||
// get input
|
||||
$this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input;
|
||||
// set params
|
||||
$this->params ??= method_exists($this->app, 'getParams')
|
||||
? $this->app->getParams()
|
||||
: Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
|
||||
$this->menu = $this->app->getMenu()->getActive();
|
||||
$this->styles = $this->get('Styles');
|
||||
$this->scripts = $this->get('Scripts');
|
||||
// get the user object
|
||||
$this->user ??= $this->app->getIdentity();###SITE_DIPLAY_METHOD###
|
||||
$this->user ??= $this->getCurrentUser();
|
||||
// Load module values
|
||||
$model = $this->getModel();
|
||||
$this->styles = $model->getStyles() ?? [];
|
||||
$this->scripts = $model->getScripts() ?? [];###SITE_DIPLAY_METHOD###
|
||||
|
||||
parent::display($tpl);
|
||||
}###SITE_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar(): void
|
||||
{###SITE_CUSTOM_BUTTONS###
|
||||
|
||||
// set help url for this view if found
|
||||
$this->help_url = ###Component###Helper::getHelpUrl('###sviews###');
|
||||
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
|
||||
{
|
||||
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
|
||||
}
|
||||
|
||||
// add the toolbar if it's not already loaded
|
||||
$this->toolbar ??= $this->getDocument()->getToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare some document related stuff.
|
||||
*
|
||||
@@ -118,26 +169,6 @@ class HtmlView extends BaseHtmlView
|
||||
}###SITE_DOCUMENT_CUSTOM_JS######SITE_JAVASCRIPT_FOR_BUTTONS###
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar(): void
|
||||
{###SITE_CUSTOM_BUTTONS###
|
||||
|
||||
// set help url for this view if found
|
||||
$this->help_url = ###Component###Helper::getHelpUrl('###sviews###');
|
||||
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
|
||||
{
|
||||
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
|
||||
}
|
||||
|
||||
// now initiate the toolbar
|
||||
$this->toolbar = Toolbar::getInstance();
|
||||
}###SITE_GET_MODULE###
|
||||
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
@@ -156,5 +187,5 @@ class HtmlView extends BaseHtmlView
|
||||
}
|
||||
|
||||
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset ?? 'UTF-8', $shorten, $length);
|
||||
}
|
||||
}###SITE_GET_MODULE###
|
||||
}
|
||||
@@ -27,6 +27,38 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\View\###
|
||||
*/
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
* The app class
|
||||
*
|
||||
* @var Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___a6ee04f5_33c7_4a9b_aa6d_6a03f3715a88___Power $app;
|
||||
|
||||
/**
|
||||
* The input class
|
||||
*
|
||||
* @var Joomla___59106b64_dd51_4280_be0a_1b9b9ebb7161___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___59106b64_dd51_4280_be0a_1b9b9ebb7161___Power $input;
|
||||
|
||||
/**
|
||||
* The params registry
|
||||
*
|
||||
* @var Joomla___a87c432d_b5b4_428e_b7ff_14b51664c624___Power
|
||||
* @since 5.2.1
|
||||
*/
|
||||
public Joomla___a87c432d_b5b4_428e_b7ff_14b51664c624___Power $params;
|
||||
|
||||
/**
|
||||
* The user object.
|
||||
*
|
||||
* @var Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power $user;
|
||||
|
||||
/**
|
||||
* The toolbar object
|
||||
*
|
||||
@@ -51,14 +83,6 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
protected array $scripts;
|
||||
|
||||
/**
|
||||
* The user object.
|
||||
*
|
||||
* @var Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public Joomla___effdaf6d_2275_425d_9f52_d4952e564d34___Power $user;
|
||||
|
||||
/**
|
||||
* Display the view
|
||||
*
|
||||
@@ -70,18 +94,45 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// get combined params of both component and menu
|
||||
// get application
|
||||
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
|
||||
$this->params = $this->app->getParams();
|
||||
// get input
|
||||
$this->input ??= method_exists($this->app, 'getInput') ? $this->app->getInput() : $this->app->input;
|
||||
// set params
|
||||
$this->params ??= method_exists($this->app, 'getParams')
|
||||
? $this->app->getParams()
|
||||
: Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
|
||||
$this->menu = $this->app->getMenu()->getActive();
|
||||
$this->styles = $this->get('Styles') ?? [];
|
||||
$this->scripts = $this->get('Scripts') ?? [];
|
||||
// get the user object
|
||||
$this->user ??= $this->getCurrentUser();###SITE_DIPLAY_METHOD###
|
||||
$this->user ??= $this->getCurrentUser();
|
||||
// Load module values
|
||||
$model = $this->getModel();
|
||||
$this->styles = $model->getStyles() ?? [];
|
||||
$this->scripts = $model->getScripts() ?? [];###SITE_DIPLAY_METHOD###
|
||||
|
||||
parent::display($tpl);
|
||||
}###SITE_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar(): void
|
||||
{###SITE_CUSTOM_BUTTONS###
|
||||
|
||||
// set help url for this view if found
|
||||
$this->help_url = ###Component###Helper::getHelpUrl('###sview###');
|
||||
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
|
||||
{
|
||||
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
|
||||
}
|
||||
|
||||
// add the toolbar if it's not already loaded
|
||||
$this->toolbar ??= $this->getDocument()->getToolbar();
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare some document related stuff.
|
||||
*
|
||||
@@ -102,26 +153,6 @@ class HtmlView extends BaseHtmlView
|
||||
}###SITE_DOCUMENT_CUSTOM_JS######SITE_JAVASCRIPT_FOR_BUTTONS###
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the page title and toolbar.
|
||||
*
|
||||
* @return void
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function addToolbar(): void
|
||||
{###SITE_CUSTOM_BUTTONS###
|
||||
|
||||
// set help url for this view if found
|
||||
$this->help_url = ###Component###Helper::getHelpUrl('###sview###');
|
||||
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
|
||||
{
|
||||
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
|
||||
}
|
||||
|
||||
// now initiate the toolbar
|
||||
$this->toolbar ??= Toolbar::getInstance();
|
||||
}###SITE_GET_MODULE###
|
||||
|
||||
/**
|
||||
* Escapes a value for output in a view script.
|
||||
*
|
||||
@@ -140,5 +171,5 @@ class HtmlView extends BaseHtmlView
|
||||
}
|
||||
|
||||
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset ?? 'UTF-8', $shorten, $length);
|
||||
}
|
||||
}###SITE_GET_MODULE###
|
||||
}
|
||||
@@ -83,5 +83,5 @@
|
||||
###ADMIN_LANGUAGES###
|
||||
</languages>
|
||||
|
||||
</administration>###UPDATESERVER###
|
||||
</administration>###UPDATESERVER######CHANGELOGSERVER###
|
||||
</extension>
|
||||
@@ -588,6 +588,11 @@
|
||||
"rename": "update_server",
|
||||
"type": "update_server"
|
||||
},
|
||||
"CHANGELOG.xml": {
|
||||
"path": "c0mp0n3nt/",
|
||||
"rename": "CHANGELOG",
|
||||
"type": "changelog_server"
|
||||
},
|
||||
"viewFile.js": {
|
||||
"path": "c0mp0n3nt/admin/assets/js",
|
||||
"rename": "viewFile",
|
||||
|
||||
Reference in new issue
Block a user