Release of v5.1.1-alpha2

Adds the ModalSelect fieldtype to Joomla Component Builder - J5. Adds the Data Import Function to the Demo Component. Adds new country related tables and fields to the Demo Component. Resolves the Database Updating issue in the compiler. #1212,#1209. Adds the Component Commands Plugin to the CLI for Import of spreadsheet data-sets.
This commit is contained in:
2025-03-28 13:15:25 +00:00
parent 06185f8c3a
commit 8342c5bb9f
536 changed files with 16369 additions and 2067 deletions

View File

@ -72,7 +72,7 @@ class AjaxController extends BaseController
// return to a callback function
$callback = $jinput->get('callback', null, 'CMD');
// Check Token!
$token = Session::getFormToken();
$token = Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{

View File

@ -56,7 +56,7 @@ class AjaxModel extends ListModel
{
parent::__construct($config, $factory);
$this->app_params = ComponentHelper::getParams('com_###component###');
$this->app ??= Factory::getApplication();
$this->app_params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
}###AJAX_MODEL_METHODS###
}

View File

@ -51,7 +51,7 @@ class HeaderCheck
public function __construct()
{
// Initializes the application object.
$this->app ??= Factory::getApplication();
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
// Initializes the document object.
$this->document = $this->app->getDocument();

View File

@ -96,7 +96,7 @@ abstract class ###Component###Helper
public static function getContributors()
{
// get params
$params = ComponentHelper::getParams('com_###component###');
$params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
// start contributors array
$contributors = [];
// get all Contributors (max 20)
@ -134,7 +134,7 @@ abstract class ###Component###Helper
public static function addSubmenu($submenu)
{
// load user for access menus
$user = Factory::getApplication()->getIdentity();
$user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();
// load the submenus to sidebar
###SUBMENU###
}###HELPER_CREATEUSER######HELPER_UIKIT######HELPER_EXEL###
@ -216,7 +216,7 @@ abstract class ###Component###Helper
{
$type = 'item';
}
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class);
$query = $db->getQuery(true);
$query->select(array('a.published'));
$query->from('#__###component###_'.$type.' AS a');
@ -234,7 +234,7 @@ abstract class ###Component###Helper
public static function getGroupName($id)
{
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class);
$query = $db->getQuery(true);
$query->select(array('a.title'));
$query->from('#__usergroups AS a');
@ -268,7 +268,7 @@ abstract class ###Component###Helper
if (!Super___91004529_94a9_4590_b842_e7c6b624ecf5___Power::check($user))
{
// get the user object
$user = Factory::getApplication()->getIdentity();
$user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();
}
// load the CMSObject
$result = new CMSObject;
@ -472,7 +472,7 @@ abstract class ###Component###Helper
}
// Get the model through the MVCFactory
return Factory::getApplication()->bootComponent('com_' . $component)->getMVCFactory()->createModel($type, $prefix, $config);
return Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->bootComponent('com_' . $component)->getMVCFactory()->createModel($type, $prefix, $config);
}
/**
@ -542,7 +542,7 @@ abstract class ###Component###Helper
if (!$asset->check() || !$asset->store())
{
Factory::getApplication()->enqueueMessage($asset->getError(), 'warning');
Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->enqueueMessage($asset->getError(), 'warning');
return false;
}
else
@ -555,7 +555,7 @@ abstract class ###Component###Helper
$object->asset_id = (int) $asset->id;
// Update their asset_id to link to the asset table.
return Factory::getDbo()->updateObject('#__###component###_'.$table, $object, 'id');
return Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getDbo()->updateObject('#__###component###_'.$table, $object, 'id');
}
}
return false;
@ -572,7 +572,7 @@ abstract class ###Component###Helper
if (!$inherit)
{
// Need to find the asset id by the name of the component.
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class);
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))

View File

@ -41,10 +41,10 @@ class HelpController extends BaseController
public function help()
{
$user = Factory::getApplication()->getIdentity();
$jinput = Factory::getApplication()->input;
$user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();
$jinput = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input;
// Check Token!
$token = Session::getFormToken();
$token = Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($user->id != 0 && ($jinput->get($token, 0, 'ALNUM') || $token === $call_token))
{
@ -83,7 +83,7 @@ class HelpController extends BaseController
protected function getHelpDocumentText($id)
{
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class);
$query = $db->getQuery(true);
$query->select(array('a.title','a.content'));
$query->from('#__###component###_help_document AS a');
@ -96,18 +96,18 @@ class HelpController extends BaseController
$text = [];
$document = $db->loadObject();
// fix image issue
$images['src="images'] = 'src="'.Uri::root().'images';
$images["src='images"] = "src='".Uri::root()."images";
$images['src="/images'] = 'src="'.Uri::root().'images';
$images["src='/images"] = "src='".Uri::root()."images";
$images['src="images'] = 'src="'.Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root().'images';
$images["src='images"] = "src='".Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root()."images";
$images['src="/images'] = 'src="'.Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root().'images';
$images["src='/images"] = "src='".Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root()."images";
// set document template
$text[] = "<!doctype html>";
$text[] = '<html>';
$text[] = "<head>";
$text[] = '<meta charset="utf-8">';
$text[] = "<title>".$document->title."</title>";
$text[] = '<link type="text/css" href="'.Uri::root().'media/com_###component###/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>';
$text[] = '<script type="text/javascript" src="'.Uri::root().'media/com_###component###/uikit/js/uikit.min.js"></script>';
$text[] = '<link type="text/css" href="'.Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root().'media/com_###component###/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>';
$text[] = '<script type="text/javascript" src="'.Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root().'media/com_###component###/uikit/js/uikit.min.js"></script>';
$text[] = "</head>";
$text[] = '<body><br />';
$text[] = '<div class="uk-container uk-container-center uk-grid-collapse">';

View File

@ -66,7 +66,7 @@ abstract class ###Component###Email
{
if (!self::$config)
{
self::$config = ComponentHelper::getParams('com_###component###');
self::$config = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
}
return self::$config;
@ -153,7 +153,7 @@ abstract class ###Component###Email
if ('global' == $mailer)
{
// get the global details
$globalConf = Factory::getConfig();
$globalConf = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig();
$mailer = $globalConf->get('mailer');
$smtpauth = ($globalConf->get('smtpauth') == 0) ? null : 1;

View File

@ -35,21 +35,21 @@ class ImportController extends BaseController
public function import()
{
// Check for request forgeries
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or jexit(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JINVALID_TOKEN'));
$model = $this->getModel('import');
if ($model->import())
{
$cache = Factory::getCache('mod_menu');
$cache = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getCache('mod_menu');
$cache->clean();
// TODO: Reset the users acl here as well to kill off any missing bits
}
$app = Factory::getApplication();
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$redirect_url = $app->getUserState('com_###component###.redirect_url');
if (empty($redirect_url))
{
$redirect_url = Route::_('index.php?option=com_###component###&view=import', false);
$redirect_url = Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=import', false);
}
else
{

View File

@ -35,21 +35,21 @@ class ###View###importController extends BaseController
public function import()
{
// Check for request forgeries
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or jexit(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JINVALID_TOKEN'));
$model = $this->getModel('###View###');
if ($model->import())
{
$cache = Factory::getCache('mod_menu');
$cache = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getCache('mod_menu');
$cache->clean();
// TODO: Reset the users acl here as well to kill off any missing bits
}
$app = Factory::getApplication();
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$redirect_url = $app->getUserState('com_###component###.redirect_url');
if (empty($redirect_url))
{
$redirect_url = Route::_('index.php?option=com_###component###&view=###view###', false);
$redirect_url = Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=###view###', false);
}
else
{

View File

@ -63,7 +63,7 @@ class HtmlView extends BaseHtmlView
}
// get the session object
$session = Factory::getSession();
$session = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getSession();
// check if it has package
$this->hasPackage = $session->get('hasPackage', false);
$this->dataType = $session->get('dataType', false);
@ -93,18 +93,18 @@ class HtmlView extends BaseHtmlView
*/
protected function addToolbar(): void
{
ToolbarHelper::title(Text::_('COM_###COMPONENT###_IMPORT_TITLE'), 'upload');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::title(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_TITLE'), 'upload');
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
{
ToolbarHelper::preferences('com_###component###');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###');
}
// set help url for this view if found
$this->help_url = ###Component###Helper::getHelpUrl('import');
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
}
}

View File

@ -43,18 +43,18 @@ class HtmlView extends BaseHtmlView
*/
protected function addToolbar(): void
{
ToolbarHelper::title(Text::_('COM_###COMPONENT###_IMPORT_TITLE'), 'upload');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::title(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_TITLE'), 'upload');
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
{
ToolbarHelper::preferences('com_###component###');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###');
}
// set help url for this view if found
$this->help_url = ###Component###Helper::getHelpUrl('###view###');
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
}
}

View File

@ -65,7 +65,7 @@ class ImportModel extends BaseDatabaseModel
*/
protected function populateState()
{
$app = Factory::getApplication('administrator');
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication('administrator');
$this->setState('message', $app->getUserState('com_###component###.message'));
$app->setUserState('com_###component###.message', '');
@ -85,8 +85,8 @@ class ImportModel extends BaseDatabaseModel
public function import()
{
$this->setState('action', 'import');
$app = Factory::getApplication();
$session = Factory::getSession();
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$session = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getSession();
$package = null;
$continue = false;
// get import type
@ -123,7 +123,7 @@ class ImportModel extends BaseDatabaseModel
break;
default:
$app->setUserState('com_###component###.message', Text::_('COM_###COMPONENT###_IMPORT_NO_IMPORT_TYPE_FOUND'));
$app->setUserState('com_###component###.message', Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_NO_IMPORT_TYPE_FOUND'));
return false;
break;
@ -137,7 +137,7 @@ class ImportModel extends BaseDatabaseModel
$this->remove($package['packagename']);
}
$app->setUserState('com_###component###.message', Text::_('COM_###COMPONENT###_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE'));
$app->setUserState('com_###component###.message', Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE'));
return false;
}
@ -155,7 +155,7 @@ class ImportModel extends BaseDatabaseModel
if (!$this->setData($package,$this->dataType,$headerList))
{
// There was an error importing the package
$msg = Text::_('COM_###COMPONENT###_IMPORT_ERROR');
$msg = Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_ERROR');
$back = $session->get('backto_VDM_IMPORT', NULL);
if ($back)
{
@ -167,7 +167,7 @@ class ImportModel extends BaseDatabaseModel
else
{
// Package imported sucessfully
$msg = Text::sprintf('COM_###COMPONENT###_IMPORT_SUCCESS', $package['packagename']);
$msg = Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('COM_###COMPONENT###_IMPORT_SUCCESS', $package['packagename']);
$back = $session->get('backto_VDM_IMPORT', NULL);
if ($back)
{
@ -195,7 +195,7 @@ class ImportModel extends BaseDatabaseModel
protected function _getPackageFromUpload()
{
// Get the uploaded file information
$app = Factory::getApplication();
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$input = $app->input;
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
@ -204,26 +204,26 @@ class ImportModel extends BaseDatabaseModel
// Make sure that file uploads are enabled in php
if (!(bool) ini_get('file_uploads'))
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning');
return false;
}
// If there is no uploaded file, we have a problem...
if (!is_array($userfile))
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning');
return false;
}
// Check if there was a problem uploading the file.
if ($userfile['error'] || $userfile['size'] < 1)
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
return false;
}
// Build the appropriate paths
$config = Factory::getConfig();
$config = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig();
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
$tmp_src = $userfile['tmp_name'];
@ -233,7 +233,7 @@ class ImportModel extends BaseDatabaseModel
// Was the package downloaded?
if (!$p_file)
{
$session = Factory::getSession();
$session = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getSession();
$session->clear('package');
$session->clear('dataType');
$session->clear('hasPackage');
@ -255,7 +255,7 @@ class ImportModel extends BaseDatabaseModel
*/
protected function _getPackageFromFolder()
{
$app = Factory::getApplication();
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$input = $app->input;
// Get the path to the package to import
@ -264,7 +264,7 @@ class ImportModel extends BaseDatabaseModel
// Did you give us a valid path?
if (!file_exists($p_dir))
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
return false;
}
@ -274,14 +274,14 @@ class ImportModel extends BaseDatabaseModel
// Did you give us a valid package?
if (!$type)
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
}
// check the extention
if(!$this->checkExtension($p_dir))
{
// set error message
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
}
@ -300,7 +300,7 @@ class ImportModel extends BaseDatabaseModel
*/
protected function _getPackageFromUrl()
{
$app = Factory::getApplication();
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$input = $app->input;
// Get the URL of the package to import
@ -309,7 +309,7 @@ class ImportModel extends BaseDatabaseModel
// Did you give us a URL?
if (!$url)
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning');
return false;
}
@ -319,7 +319,7 @@ class ImportModel extends BaseDatabaseModel
// Was the package downloaded?
if (!$p_file)
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning');
return false;
}
@ -340,7 +340,7 @@ class ImportModel extends BaseDatabaseModel
*/
protected function check($archivename)
{
$app = Factory::getApplication();
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
// Clean the name
$archivename = Path::clean($archivename);
@ -349,11 +349,11 @@ class ImportModel extends BaseDatabaseModel
{
// Cleanup the import files
$this->remove($archivename);
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
}
$config = Factory::getConfig();
$config = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig();
// set Package Name
$check['packagename'] = $archivename;
@ -378,7 +378,7 @@ class ImportModel extends BaseDatabaseModel
{
jimport('joomla.filesystem.file');
$config = Factory::getConfig();
$config = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig();
$package = $config->get('tmp_path'). '/' .$package;
// Is the package file a valid file?
@ -396,7 +396,7 @@ class ImportModel extends BaseDatabaseModel
protected function getAlias($name,$type = false)
{
// sanitize the name to an alias
if (Factory::getConfig()->get('unicodeslugs') == 1)
if (Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig()->get('unicodeslugs') == 1)
{
$alias = OutputFilter::stringURLUnicodeSlug($name);
}

View File

@ -65,7 +65,7 @@ class ###View###importModel extends BaseDatabaseModel
*/
protected function populateState()
{
$app = Factory::getApplication('administrator');
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication('administrator');
$this->setState('message', $app->getUserState('com_###component###.message'));
$app->setUserState('com_###component###.message', '');
@ -85,7 +85,7 @@ class ###View###importModel extends BaseDatabaseModel
protected function _getPackageFromUpload()
{
// Get the uploaded file information
$app = Factory::getApplication();
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$input = $app->input;
// Do not change the filter type 'raw'. We need this to let files containing PHP code to upload. See JInputFiles::get.
@ -94,26 +94,26 @@ class ###View###importModel extends BaseDatabaseModel
// Make sure that file uploads are enabled in php
if (!(bool) ini_get('file_uploads'))
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTFILE'), 'warning');
return false;
}
// If there is no uploaded file, we have a problem...
if (!is_array($userfile))
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_NO_FILE_SELECTED'), 'warning');
return false;
}
// Check if there was a problem uploading the file.
if ($userfile['error'] || $userfile['size'] < 1)
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_WARNIMPORTUPLOADERROR'), 'warning');
return false;
}
// Build the appropriate paths
$config = Factory::getConfig();
$config = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig();
$tmp_dest = $config->get('tmp_path') . '/' . $userfile['name'];
$tmp_src = $userfile['tmp_name'];
@ -123,7 +123,7 @@ class ###View###importModel extends BaseDatabaseModel
// Was the package downloaded?
if (!$p_file)
{
$session = Factory::getSession();
$session = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getSession();
$session->clear('package');
$session->clear('dataType');
$session->clear('hasPackage');
@ -145,7 +145,7 @@ class ###View###importModel extends BaseDatabaseModel
*/
protected function _getPackageFromFolder()
{
$app = Factory::getApplication();
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$input = $app->input;
// Get the path to the package to import
@ -154,7 +154,7 @@ class ###View###importModel extends BaseDatabaseModel
// Did you give us a valid path?
if (!file_exists($p_dir))
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_ENTER_A_PACKAGE_DIRECTORY'), 'warning');
return false;
}
@ -164,14 +164,14 @@ class ###View###importModel extends BaseDatabaseModel
// Did you give us a valid package?
if (!$type)
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_PATH_DOES_NOT_HAVE_A_VALID_PACKAGE'), 'warning');
}
// check the extention
if(!$this->checkExtension($p_dir))
{
// set error message
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
}
@ -190,7 +190,7 @@ class ###View###importModel extends BaseDatabaseModel
*/
protected function _getPackageFromUrl()
{
$app = Factory::getApplication();
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$input = $app->input;
// Get the URL of the package to import
@ -199,7 +199,7 @@ class ###View###importModel extends BaseDatabaseModel
// Did you give us a URL?
if (!$url)
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL'), 'warning');
return false;
}
@ -209,7 +209,7 @@ class ###View###importModel extends BaseDatabaseModel
// Was the package downloaded?
if (!$p_file)
{
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_INVALID_URL'), 'warning');
return false;
}
@ -230,7 +230,7 @@ class ###View###importModel extends BaseDatabaseModel
*/
protected function check($archivename)
{
$app = Factory::getApplication();
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
// Clean the name
$archivename = Path::clean($archivename);
@ -239,11 +239,11 @@ class ###View###importModel extends BaseDatabaseModel
{
// Cleanup the import files
$this->remove($archivename);
$app->enqueueMessage(Text::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
$app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_DOES_NOT_HAVE_A_VALID_FILE_TYPE'), 'warning');
return false;
}
$config = Factory::getConfig();
$config = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig();
// set Package Name
$check['packagename'] = $archivename;
@ -267,7 +267,7 @@ class ###View###importModel extends BaseDatabaseModel
*/
protected function remove($package)
{
$config = Factory::getConfig();
$config = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig();
$package = $config->get('tmp_path'). '/' .$package;
// Is the package file a valid file?
@ -287,7 +287,7 @@ class ###View###importModel extends BaseDatabaseModel
protected function getAlias($name,$type = false)
{
// sanitize the name to an alias
if (Factory::getConfig()->get('unicodeslugs') == 1)
if (Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getConfig()->get('unicodeslugs') == 1)
{
$alias = OutputFilter::stringURLUnicodeSlug($name);
}

View File

@ -19,9 +19,12 @@ defined('_JCB_TEMPLATE') or die;
// No direct access to this file
defined('_JEXEC') or die;
$layout = $this->isModal ? 'modal' : 'edit';
$tmpl = $this->input->get('tmpl');
$tmpl = $tmpl ? '&tmpl=' . $tmpl : '';
?>
###EDITBODYFADEIN###
<form action="<?php echo Route::_('index.php?option=com_###component###&layout=edit&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<form action="<?php echo Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&&layout=' . $layout . $tmpl . '&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
###EDITBODY###
</form>
</div>###EDITBODYSCRIPT###

View File

@ -22,7 +22,7 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED###
if ($this->saveOrder)
{
$saveOrderingUrl = 'index.php?option=com_###component###&task=###views###.saveOrderAjax&tmpl=component';
Html::_('sortablelist.sortable', '###view###List', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('sortablelist.sortable', '###view###List', 'adminForm', strtolower($this->listDirn), $saveOrderingUrl);
}
?>
###VIEWS_DEFAULT_BODY######VIEWS_FOOTER_SCRIPT###

View File

@ -76,6 +76,22 @@ class HtmlView extends BaseHtmlView
*/
public string $return_here;
/**
* The title key used in modal
*
* @var string
* @since 5.2.1
*/
public string $modalTitleKey;
/**
* The modal state
*
* @var bool
* @since 5.2.1
*/
public bool $isModal;
/**
* The user object.
*
@ -104,7 +120,7 @@ class HtmlView extends BaseHtmlView
$this->user ??= $this->getCurrentUser();###ADMIN_DIPLAY_METHOD###
$this->saveOrder = $this->listOrder == 'a.ordering';
// set the return here value
$this->return_here = urlencode(base64_encode((string) Uri::getInstance()));
$this->return_here = urlencode(base64_encode((string) Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::getInstance()));
// get global action permissions
$this->canDo = ###Component###Helper::getActions('###view###');###JVIEWLISTCANDO###
@ -115,8 +131,10 @@ class HtmlView extends BaseHtmlView
}
// We don't need toolbar in the modal window.
$this->isModal = true;
if ($this->getLayout() !== 'modal')
{
$this->isModal = false;
$this->addToolbar();
}
@ -141,11 +159,11 @@ class HtmlView extends BaseHtmlView
*/
protected function addToolbar(): void
{
ToolbarHelper::title(Text::_('COM_###COMPONENT###_###VIEWS###'), '###ICOMOON###');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::title(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###VIEWS###'), '###ICOMOON###');
if ($this->canCreate)
{
ToolbarHelper::addNew('###view###.add');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::addNew('###view###.add');
}
// Only load if there are items
@ -153,28 +171,28 @@ class HtmlView extends BaseHtmlView
{
if ($this->canEdit)
{
ToolbarHelper::editList('###view###.edit');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::editList('###view###.edit');
}
if ($this->canState)
{
ToolbarHelper::publishList('###views###.publish');
ToolbarHelper::unpublishList('###views###.unpublish');
ToolbarHelper::archiveList('###views###.archive');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::publishList('###views###.publish');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::unpublishList('###views###.unpublish');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::archiveList('###views###.archive');
if ($this->canDo->get('core.admin'))
{
ToolbarHelper::checkin('###views###.checkin');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::checkin('###views###.checkin');
}
}###CUSTOM_ADMIN_DYNAMIC_BUTTONS######ADMIN_CUSTOM_BUTTONS_LIST###
if ($this->state->get('filter.published') == -2 && ($this->canState && $this->canDelete))
{
ToolbarHelper::deleteList('', '###views###.delete', 'JTOOLBAR_EMPTY_TRASH');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::deleteList('', '###views###.delete', 'JTOOLBAR_EMPTY_TRASH');
}
elseif ($this->canState && $this->canDelete)
{
ToolbarHelper::trash('###views###.trash');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::trash('###views###.trash');
}###EXPORTBUTTON###
}###ADMIN_CUSTOM_FUNCTION_ONLY_BUTTONS_LIST######IMPORTBUTTON###
@ -182,13 +200,13 @@ class HtmlView extends BaseHtmlView
$this->help_url = ###Component###Helper::getHelpUrl('###views###');
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
{
ToolbarHelper::preferences('com_###component###');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###');
}###FILTERFIELDDISPLAYHELPER######BATCHDISPLAYHELPER###
}
@ -200,16 +218,16 @@ class HtmlView extends BaseHtmlView
*/
protected function _prepareDocument(): void
{###JQUERY###
$this->getDocument()->setTitle(Text::_('COM_###COMPONENT###_###VIEWS###'));
$this->getDocument()->setTitle(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###VIEWS###'));
// add styles
foreach ($this->styles as $style)
{
Html::_('stylesheet', $style, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
}
// add scripts
foreach ($this->scripts as $script)
{
Html::_('script', $script, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
}###ADMIN_ADD_JAVASCRIPT_FILE###
}
@ -233,6 +251,17 @@ class HtmlView extends BaseHtmlView
return Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($var, $this->_charset ?? 'UTF-8', $shorten, $length);
}
/**
* Get the modal data/title key
*
* @return string The key value.
* @since 5.2.1
*/
public function getModalTitleKey(): string
{
return $this->modalTitleKey ?? 'id';
}
/**
* Returns an array of fields the table can be sorted by
*

View File

@ -0,0 +1,39 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September 2022
* @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
*/
// No direct access to this JCB template file (EVER)
defined('_JCB_TEMPLATE') or die;
?>
###BOM###
###ADMIN_VIEWS_MODAL_HEADER###
// No direct access to this file
defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED###
/** @var \###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\View\###Views###\HtmlView $this */
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
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');
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
$wa->useScript('core')
->useScript('multiselect')
->useScript('modal-content-select');
?>
###VIEWS_MODAL_BODY######VIEWS_FOOTER_SCRIPT###

View File

@ -76,7 +76,7 @@ class ###Views###Model extends ListModel
parent::__construct($config, $factory);
$this->app ??= Factory::getApplication();
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
}###ADMIN_CUSTOM_BUTTONS_METHOD_LIST###
/**

View File

@ -149,13 +149,13 @@ class ###View###Controller extends FormController
*/
public function batch($model = null)
{
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or exit(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('###View###', '', []);
// Preset the redirect
$this->setRedirect(Route::_('index.php?option=com_###component###&view=###views###' . $this->getRedirectToListAppend(), false));
$this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=###views###' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
@ -180,13 +180,13 @@ class ###View###Controller extends FormController
$cancel = parent::cancel($key);
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
if (!is_null($return) && Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_(
$redirect, false
)
);
@ -197,7 +197,7 @@ class ###View###Controller extends FormController
// Redirect to the item screen.
$this->setRedirect(
Route::_(
Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -208,7 +208,7 @@ class ###View###Controller extends FormController
// Redirect to the list screen.
$this->setRedirect(
Route::_(
Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -234,7 +234,7 @@ class ###View###Controller extends FormController
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
$canReturn = (!is_null($return) && Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
@ -252,7 +252,7 @@ class ###View###Controller extends FormController
// Redirect to the return value.
$this->setRedirect(
Route::_(
Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_(
$redirect, false
)
);
@ -263,7 +263,7 @@ class ###View###Controller extends FormController
// Redirect to the item screen.
$this->setRedirect(
Route::_(
Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -274,7 +274,7 @@ class ###View###Controller extends FormController
// Redirect to the list screen.
$this->setRedirect(
Route::_(
Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_(
'index.php?option=' . $this->option . $redirect, false
)
);

View File

@ -36,6 +36,14 @@ class HtmlView extends BaseHtmlView
*/
public mixed $item;
/**
* 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 state object
*
@ -108,6 +116,14 @@ class HtmlView extends BaseHtmlView
*/
public string $referral;
/**
* The modal state
*
* @var bool
* @since 5.2.1
*/
public bool $isModal;
/**
* ###View### view display method
*
@ -120,7 +136,7 @@ class HtmlView extends BaseHtmlView
public function display($tpl = null): void
{
// set params
$this->params = ComponentHelper::getParams('com_###component###');
$this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
$this->useCoreUI = true;
// Assign the variables
$this->form ??= $this->get('Form');
@ -131,10 +147,10 @@ class HtmlView extends BaseHtmlView
// get action permissions
$this->canDo = ###Component###Helper::getActions('###view###', $this->item);
// get input
$jinput = Factory::getApplication()->input;
$this->ref = $jinput->get('ref', 0, 'word');
$this->refid = $jinput->get('refid', 0, 'int');
$return = $jinput->get('return', null, 'base64');
$this->input ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input;
$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)
@ -155,7 +171,16 @@ class HtmlView extends BaseHtmlView
}###LINKEDVIEWITEMS###
// Set the toolbar
$this->addToolBar();
if ($this->getLayout() !== 'modal')
{
$this->isModal = false;
$this->addToolbar();
}
else
{
$this->isModal = true;
$this->addModalToolbar();
}
// Check for errors.
if (count($errors = $this->get('Errors')))
@ -170,11 +195,11 @@ class HtmlView extends BaseHtmlView
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
* @throws \Exception
* @since 1.6
*/
protected function addToolbar(): void
@ -182,6 +207,18 @@ class HtmlView extends BaseHtmlView
###ADDTOOLBAR###
}
/**
* Add the modal toolbar.
*
* @return void
* @throws \Exception
* @since 5.0.0
*/
protected function addModalToolbar()
{
###ADDMODALTOOLBAR###
}
/**
* Escapes a value for output in a view script.
*
@ -211,16 +248,16 @@ class HtmlView extends BaseHtmlView
protected function _prepareDocument(): void
{###JQUERY###
$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
$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)
{
Html::_('stylesheet', $style, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
}###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
// add scripts
foreach ($this->scripts as $script)
{
Html::_('script', $script, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
}###DOCUMENT_CUSTOM_PHP###
}
}

View File

@ -0,0 +1,28 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September 2022
* @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
*/
// No direct access to this JCB template file (EVER)
defined('_JCB_TEMPLATE') or die;
?>
###BOM###
// No direct access to this file
defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED###
/** @var \###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\View\###View###\HtmlView $this */
?>
<div class="subhead noshadow mb-3">
<?php echo $this->getDocument()->getToolbar('toolbar')->render(); ?>
</div>
<div class="container-popup">
<?php $this->setLayout('edit'); ?>
<?php echo $this->loadTemplate(); ?>
</div>

View File

@ -229,7 +229,7 @@ class ###View###Model extends AdminModel
*/
protected function prepareTable($table)
{###LICENSE_TABLE_LOCKED_CHECK###
$date = Factory::getDate();
$date = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getDate();
$user = $this->getCurrentUser();
if (isset($table->name))
@ -285,7 +285,7 @@ class ###View###Model extends AdminModel
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = Factory::getApplication()->getUserState('com_###component###.edit.###view###.data', []);
$data = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getUserState('com_###component###.edit.###view###.data', []);
if (empty($data))
{
@ -359,7 +359,7 @@ class ###View###Model extends AdminModel
if (empty($pks))
{
$this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED'));
$this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JGLOBAL_NO_ITEM_SELECTED'));
return false;
}
@ -376,7 +376,7 @@ class ###View###Model extends AdminModel
if (!$this->canDo->get('core.batch'))
{
$this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
$this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
@ -419,7 +419,7 @@ class ###View###Model extends AdminModel
if (!$done)
{
$this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
$this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
@ -439,7 +439,7 @@ class ###View###Model extends AdminModel
*/
public function save($data)
{
$input = Factory::getApplication()->getInput();
$input = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getInput();
$filter = InputFilter::getInstance();
// set the metadata to the Item Data

View File

@ -107,7 +107,7 @@ class ###View###Table extends Table implements VersionableTableInterface, Taggab
*/
public function store($updateNulls = false)
{
$date = Factory::getDate()->toSql();
$date = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getDate()->toSql();
$userId = $this->getCurrentUser()->id;
if ($this->id)
@ -137,11 +137,11 @@ class ###View###Table extends Table implements VersionableTableInterface, Taggab
if ($table->load(['alias' => $this->alias###JTABLEALIASCATEGORY###]) && ($table->id != $this->id || $this->id == 0))
{
$this->setError(Text::_('COM_###COMPONENT###_###VIEW###_ERROR_UNIQUE_ALIAS'));
$this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###VIEW###_ERROR_UNIQUE_ALIAS'));
if ($table->published === -2)
{
$this->setError(Text::_('COM_###COMPONENT###_###VIEW###_ERROR_UNIQUE_ALIAS_TRASHED'));
$this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###VIEW###_ERROR_UNIQUE_ALIAS_TRASHED'));
}
return false;
@ -258,7 +258,7 @@ class ###View###Table extends Table implements VersionableTableInterface, Taggab
protected function getDefaultAssetValues($component, $try = true)
{
// Need to find the asset id by the name of the component.
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class);
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))

View File

@ -24,5 +24,5 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED######CUSTOM_ADMIN_CODE_BODY##
<?php $urlId = (isset($this->item->id)) ? '&id='. (int) $this->item->id : ''; ?>
###CUSTOM_ADMIN_TOP_FORM######CUSTOM_ADMIN_BODY######CUSTOM_ADMIN_BOTTOM_FORM###
<?php else: ?>
<h1><?php echo Text::_('COM_###COMPONENT###_NO_ACCESS_GRANTED'); ?></h1>
<h1><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_NO_ACCESS_GRANTED'); ?></h1>
<?php endif; ?>

View File

@ -23,5 +23,5 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED######CUSTOM_ADMIN_CODE_BODY##
<?php if ($this->canDo->get('###sview###.access')): ?>###CUSTOM_ADMIN_SUBMITBUTTON_SCRIPT###
###CUSTOM_ADMIN_TOP_FORM######CUSTOM_ADMIN_BODY######CUSTOM_ADMIN_BOTTOM_FORM###
<?php else: ?>
<h1><?php echo Text::_('COM_###COMPONENT###_NO_ACCESS_GRANTED'); ?></h1>
<h1><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_NO_ACCESS_GRANTED'); ?></h1>
<?php endif; ?>

View File

@ -60,6 +60,6 @@ class ###SViews###Controller extends AdminController
*/
public function dashboard(): void
{
$this->setRedirect(Route::_('index.php?option=com_###component###', false));
$this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###', false));
}###CUSTOM_ADMIN_CUSTOM_BUTTONS_CONTROLLER###
}

View File

@ -72,9 +72,9 @@ class HtmlView extends BaseHtmlView
public function display($tpl = null): void
{
// get component params
$this->params = ComponentHelper::getParams('com_###component###');
$this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
// get the application
$this->app ??= Factory::getApplication();
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
// get the user object
$this->user ??= $this->getCurrentUser();
// get global action permissions
@ -99,12 +99,12 @@ class HtmlView extends BaseHtmlView
// add styles
foreach ($this->styles as $style)
{
Html::_('stylesheet', $style, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
}###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS###
// add scripts
foreach ($this->scripts as $script)
{
Html::_('script', $script, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
}###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS###
}
@ -117,19 +117,19 @@ class HtmlView extends BaseHtmlView
protected function addToolbar(): void
{###HIDEMAINMENU###
// add title to the page
ToolbarHelper::title(Text::_('COM_###COMPONENT###_###SVIEWS###'),'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::title(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###SVIEWS###'),'###ICOMOON###');###CUSTOM_ADMIN_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))
{
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
{
ToolbarHelper::preferences('com_###component###');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###');
}
}###CUSTOM_ADMIN_GET_MODULE###

View File

@ -125,7 +125,7 @@ class ###SViews###Model extends ListModel
{
parent::__construct($config, $factory);
$this->app ??= Factory::getApplication();
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$this->input ??= $this->app->getInput();
// Set the current user for authorisation checks (for those calling this model directly)
@ -162,7 +162,7 @@ class ###SViews###Model extends ListModel
// check if this user has permission to access items
if (!$user->authorise('###sviews###.access', 'com_###component###'))
{
$this->app->enqueueMessage(Text::_('Not authorised!'), 'error');
$this->app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('Not authorised!'), 'error');
// redirect away if not a correct to default view
$this->app->redirect('index.php?option=com_###component###');
return false;
@ -171,7 +171,7 @@ class ###SViews###Model extends ListModel
$items = parent::getItems();
// Get the global params
$globalParams = ComponentHelper::getParams('com_###component###', true);###CUSTOM_ADMIN_GET_ITEMS######CUSTOM_ADMIN_AFTER_GET_ITEMS###
$globalParams = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###', true);###CUSTOM_ADMIN_GET_ITEMS######CUSTOM_ADMIN_AFTER_GET_ITEMS###
// return items
return $items;

View File

@ -51,6 +51,6 @@ class ###SView###Controller extends BaseController
*/
public function dashboard(): void
{
$this->setRedirect(Route::_('index.php?option=com_###component###', false));
$this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###', false));
}###CUSTOM_ADMIN_CUSTOM_BUTTONS_CONTROLLER###
}

View File

@ -40,11 +40,11 @@ class HtmlView extends BaseHtmlView
public function display($tpl = null): void
{
// get component params
$this->params = ComponentHelper::getParams('com_###component###');
$this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
// get the application
$this->app ??= Factory::getApplication();
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
// get the user object
$this->user ??= Factory::getApplication()->getIdentity();
$this->user ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();
// get global action permissions
$this->canDo = ###Component###Helper::getActions('###sview###');
$this->styles = $this->get('Styles');
@ -67,12 +67,12 @@ class HtmlView extends BaseHtmlView
// add styles
foreach ($this->styles as $style)
{
Html::_('stylesheet', $style, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
}###CUSTOM_ADMIN_DOCUMENT_CUSTOM_CSS###
// add scripts
foreach ($this->scripts as $script)
{
Html::_('script', $script, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
}###CUSTOM_ADMIN_DOCUMENT_CUSTOM_JS###
}
@ -92,22 +92,22 @@ class HtmlView extends BaseHtmlView
// Check for empty title and add view name if param is set
if (empty($title))
{
$title = Text::_('COM_###COMPONENT###_###SVIEW###');
$title = Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###SVIEW###');
}
// add title to the page
ToolbarHelper::title($title,'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::title($title,'###ICOMOON###');###CUSTOM_ADMIN_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))
{
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// add the options comp button
if ($this->canDo->get('core.admin') || $this->canDo->get('core.options'))
{
ToolbarHelper::preferences('com_###component###');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###');
}
}###CUSTOM_ADMIN_GET_MODULE###

View File

@ -139,7 +139,7 @@ class ###SView###Model extends ItemModel
{
parent::__construct($config, $factory);
$this->app ??= Factory::getApplication();
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$this->input ??= $this->app->getInput();
// Set the current user for authorisation checks (for those calling this model directly)
@ -185,7 +185,7 @@ class ###SView###Model extends ItemModel
// check if this user has permission to access item
if (!$this->user->authorise('###sview###.access', 'com_###component###'))
{
$this->app->enqueueMessage(Text::_('Not authorised!'), 'error');
$this->app->enqueueMessage(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('Not authorised!'), 'error');
// redirect away if not a correct to cPanel/default view
$this->app->redirect('index.php?option=com_###component###');
return false;

View File

@ -51,7 +51,7 @@ class ###Component###Model extends ListModel
public function getIcons()
{
// load user for access menus
$user = Factory::getApplication()->getIdentity();
$user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();
// reset icon array
$icons = [];
// view groups array

View File

@ -71,18 +71,18 @@ class HtmlView extends BaseHtmlView
protected function addToolbar(): void
{
$canDo = ###Component###Helper::getActions('###component###');
ToolbarHelper::title(Text::_('COM_###COMPONENT###_DASHBOARD'), 'grid-2');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::title(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_DASHBOARD'), 'grid-2');
// set help url for this view if found
$this->help_url = ###Component###Helper::getHelpUrl('###component###');
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
if ($canDo->get('core.admin') || $canDo->get('core.options'))
{
ToolbarHelper::preferences('com_###component###');
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::preferences('com_###component###');
}
}
@ -95,18 +95,18 @@ class HtmlView extends BaseHtmlView
protected function _prepareDocument(): void
{
// set page title
$this->getDocument()->setTitle(Text::_('COM_###COMPONENT###_DASHBOARD'));
$this->getDocument()->setTitle(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_DASHBOARD'));
// add manifest to page JavaScript
$this->getDocument()->addScriptDeclaration("var manifest = JSON.parse(" . json_encode($this->manifest) . ");", "text/javascript");
// add styles
foreach ($this->styles as $style)
{
Html::_('stylesheet', $style, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
}
// add scripts
foreach ($this->scripts as $script)
{
Html::_('script', $script, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
}
}
}

View File

@ -0,0 +1,74 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September 2022
* @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
*/
// No direct access to this JCB template file (EVER)
defined('_JCB_TEMPLATE') or die;
?>
###BOM###
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Field;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Field\ModalSelectField as ModalSelectFieldCore;
use Joomla\Database\ParameterType;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* A modal content selection field, now with the radical ability to handle string-based GUIDs.
* Because, apparently, assuming everything is an integer was the hill to die on.
*
* This override exists solely to bypass a hardcoded constraint that shouldn't have been there in the first place.
* But hey, at least we get another class extension to maintain!
*
* @since 5.0.0
*/
class ModalSelectField extends ModalSelectFieldCore
{
/**
* Method to retrieve the title of selected item.
*
* @return string
*
* @since 5.0.0
*/
protected function getValueTitle()
{
// Selecting the title for the field value, when required info were given
if ($this->value && $this->sql_title_table && $this->sql_title_column && $this->sql_title_key) {
try {
$db = $this->getDatabase();
$query = $db->getQuery(true)
->select($db->quoteName($this->sql_title_column))
->from($db->quoteName($this->sql_title_table))
->where($db->quoteName($this->sql_title_key) . ' = :value')
->bind(':value', $this->value, is_numeric($this->value) ? ParameterType::INTEGER : ParameterType::STRING);
/**
* All this—just because someone decided to hardcode [ParameterType::INTEGER] in the core.
* We could have just handle it dynamically, but no...
*
* Polymorphic behavior isn't the enemy. Hardcoded constraints that force class extensions?
* Now *that's* the real problem. But sure, let's keep pretending that integers are the
* only valid identifiers in a database.
*/
$db->setQuery($query);
return $db->loadResult() ?: $this->value;
} catch (\Throwable $e) {
Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');
}
}
return $this->value;
}
}

View File

@ -122,8 +122,8 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
$this->minimumJoomla = '4.3';
$this->minimumPhp = JOOMLA_MINIMUM_PHP;
$this->app ??= Factory::getApplication();
$this->db = Factory::getContainer()->get(DatabaseInterface::class);
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$this->db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class);
// check if the files exist
if (is_file(JPATH_ROOT . '/administrator/components/com_###component###/###component###.php'))
@ -212,7 +212,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
// Check for the minimum PHP version before continuing
if (!empty($this->minimumPhp) && version_compare(PHP_VERSION, $this->minimumPhp, '<'))
{
Log::add(Text::sprintf('JLIB_INSTALLER_MINIMUM_PHP', $this->minimumPhp), Log::WARNING, 'jerror');
Log::add(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('JLIB_INSTALLER_MINIMUM_PHP', $this->minimumPhp), Log::WARNING, 'jerror');
return false;
}
@ -220,7 +220,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
// Check for the minimum Joomla version before continuing
if (!empty($this->minimumJoomla) && version_compare(JVERSION, $this->minimumJoomla, '<'))
{
Log::add(Text::sprintf('JLIB_INSTALLER_MINIMUM_JOOMLA', $this->minimumJoomla), Log::WARNING, 'jerror');
Log::add(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('JLIB_INSTALLER_MINIMUM_JOOMLA', $this->minimumJoomla), Log::WARNING, 'jerror');
return false;
}
@ -361,7 +361,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
if (is_file(JPATH_ROOT . $file) && !File::delete(JPATH_ROOT . $file))
{
echo Text::sprintf('JLIB_INSTALLER_ERROR_FILE_FOLDER', $file) . '<br>';
echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('JLIB_INSTALLER_ERROR_FILE_FOLDER', $file) . '<br>';
}
}
}
@ -372,7 +372,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
if (is_dir(JPATH_ROOT . $folder) && !Folder::delete(JPATH_ROOT . $folder))
{
echo Text::sprintf('JLIB_INSTALLER_ERROR_FILE_FOLDER', $folder) . '<br>';
echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('JLIB_INSTALLER_ERROR_FILE_FOLDER', $folder) . '<br>';
}
}
}
@ -394,7 +394,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
if (file_exists(JPATH_ROOT . $file) && !File::move(JPATH_ROOT . $file, JPATH_ROOT . '/cli/' . $name))
{
echo Text::sprintf('JLIB_INSTALLER_FILE_ERROR_MOVE', $name);
echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('JLIB_INSTALLER_FILE_ERROR_MOVE', $name);
}
}
}
@ -450,7 +450,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If its successfully update.
$this->app->enqueueMessage(
Text::sprintf('The (%s) was found in the <b>#__content_types</b> table, and updated.', $content->type_alias)
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) was found in the <b>#__content_types</b> table, and updated.', $content->type_alias)
);
}
}
@ -458,7 +458,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If its successfully added.
$this->app->enqueueMessage(
Text::sprintf('The (%s) was added to the <b>#__content_types</b> table.', $content->type_alias)
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) was added to the <b>#__content_types</b> table.', $content->type_alias)
);
}
}
@ -510,7 +510,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If its successfully update.
$this->app->enqueueMessage(
Text::sprintf('The (%s) was found in the <b>#__action_log_config</b> table, and updated.', $content->type_alias)
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) was found in the <b>#__action_log_config</b> table, and updated.', $content->type_alias)
);
}
}
@ -518,7 +518,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If its successfully added.
$this->app->enqueueMessage(
Text::sprintf('The (%s) was added to the <b>#__action_log_config</b> table.', $content->type_alias)
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) was added to the <b>#__action_log_config</b> table.', $content->type_alias)
);
}
}
@ -549,14 +549,14 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If its already set don't set it again.
$this->app->enqueueMessage(
Text::_('The (com_###component###) is already in the <b>#__action_logs_extensions</b> table.')
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('The (com_###component###) is already in the <b>#__action_logs_extensions</b> table.')
);
}
elseif ($this->db->insertObject('#__action_logs_extensions', $data))
{
// give a success message
$this->app->enqueueMessage(
Text::_('The (com_###component###) was successfully added to the <b>#__action_logs_extensions</b> table.')
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('The (com_###component###) was successfully added to the <b>#__action_logs_extensions</b> table.')
);
}
}
@ -594,7 +594,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// give a success message
$this->app->enqueueMessage(
Text::_('The (com_###component###) rules was successfully added to the <b>#__assets</b> table.')
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('The (com_###component###) rules was successfully added to the <b>#__assets</b> table.')
);
}
}
@ -632,7 +632,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// give a success message
$this->app->enqueueMessage(
Text::_('The (com_###component###) params was successfully added to the <b>#__extensions</b> table.')
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('The (com_###component###) params was successfully added to the <b>#__extensions</b> table.')
);
}
}
@ -670,7 +670,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
if ($done)
{
$this->app->enqueueMessage(
Text::sprintf('The <b>#__assets</b> table rules column was resized to the %s datatype for the components possible large permission rules.', $dataType)
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The <b>#__assets</b> table rules column was resized to the %s datatype for the components possible large permission rules.', $dataType)
);
}
}
@ -749,7 +749,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If successfully remove Item add queued success message.
$this->app->enqueueMessage(
Text::sprintf('The (%s) type alias was removed from the <b>#__content_type</b> table.', $context)
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) type alias was removed from the <b>#__content_type</b> table.', $context)
);
}
@ -810,7 +810,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If successfully remove context add queued success message.
$this->app->enqueueMessage(
Text::sprintf('The fields with context (%s) was removed from the <b>#__fields</b> table.', $context)
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The fields with context (%s) was removed from the <b>#__fields</b> table.', $context)
);
}
@ -846,7 +846,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If successfully remove release_check add queued success message.
$this->app->enqueueMessage(
Text::sprintf('The fields values for (%s) was removed from the <b>#__fields_values</b> table.', $context)
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The fields values for (%s) was removed from the <b>#__fields_values</b> table.', $context)
);
}
}
@ -900,7 +900,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If successfully remove context add queued success message.
$this->app->enqueueMessage(
Text::sprintf('The fields with context (%s) was removed from the <b>#__fields_groups</b> table.', $context)
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The fields with context (%s) was removed from the <b>#__fields_groups</b> table.', $context)
);
}
}
@ -933,7 +933,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If successfully removed Items add queued success message.
$this->app->enqueueMessage(
Text::sprintf('The (%s) items were removed from the <b>#__history</b> table.', $context)
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) items were removed from the <b>#__history</b> table.', $context)
);
}
}
@ -967,7 +967,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
}
$this->app->enqueueMessage(
Text::_('All related items was removed from the <b>#__ucm_base</b> table.')
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('All related items was removed from the <b>#__ucm_base</b> table.')
);
}
@ -998,7 +998,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If successfully removed Item add queued success message.
$this->app->enqueueMessage(
Text::sprintf('The (%s) type alias was removed from the <b>#__ucm_content</b> table.', $context)
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) type alias was removed from the <b>#__ucm_content</b> table.', $context)
);
}
}
@ -1033,7 +1033,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If successfully remove Item add queued success message.
$this->app->enqueueMessage(
Text::sprintf('The (%s) type alias was removed from the <b>#__contentitem_tag_map</b> table.', $context)
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) type alias was removed from the <b>#__contentitem_tag_map</b> table.', $context)
);
}
}
@ -1065,7 +1065,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If successfully removed ###component### view add queued success message.
$this->app->enqueueMessage(
Text::sprintf('The (%s) type alias was removed from the <b>#__action_log_config</b> table.', $context)
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('The (%s) type alias was removed from the <b>#__action_log_config</b> table.', $context)
);
}
}
@ -1093,7 +1093,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If successfully removed ###component### add queued success message.
$this->app->enqueueMessage(
Text::_('All related (com_###component###) items was removed from the <b>#__assets</b> table.')
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('All related (com_###component###) items was removed from the <b>#__assets</b> table.')
);
}
}
@ -1123,7 +1123,7 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
{
// If successfully remove ###component### add queued success message.
$this->app->enqueueMessage(
Text::_('The (com_###component###) extension was removed from the <b>#__action_logs_extensions</b> table.')
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('The (com_###component###) extension was removed from the <b>#__action_logs_extensions</b> table.')
);
}
}
@ -1151,13 +1151,13 @@ class Com_###Component###InstallerScript implements InstallerScriptInterface
$this->db->execute();
$this->app->enqueueMessage(
Text::_('Reverted the <b>#__assets</b> table rules column back to its default size of varchar(5120).')
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('Reverted the <b>#__assets</b> table rules column back to its default size of varchar(5120).')
);
}
else
{
$this->app->enqueueMessage(
Text::_('Could not revert the <b>#__assets</b> table rules column back to its default size of varchar(5120), since there is still one or more components that still requires the column to be larger.')
Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('Could not revert the <b>#__assets</b> table rules column back to its default size of varchar(5120), since there is still one or more components that still requires the column to be larger.')
);
}
}

View File

@ -22,7 +22,7 @@ defined('_JEXEC') or die;
?>
<div class="###component###-###view###">
<?php echo $this->toolbar->render(); ?>
<form action="<?php echo Route::_('index.php?option=com_###component###&layout=edit&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<form action="<?php echo Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&layout=edit&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
###EDITBODY###
</form>
</div>###EDITBODYSCRIPT###

View File

@ -149,13 +149,13 @@ class ###View###Controller extends FormController
*/
public function batch($model = null)
{
Session::checkToken() or jexit(Text::_('JINVALID_TOKEN'));
Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::checkToken() or jexit(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JINVALID_TOKEN'));
// Set the model
$model = $this->getModel('###View###', '', []);
// Preset the redirect
$this->setRedirect(Route::_('index.php?option=com_###component###&view=###views###' . $this->getRedirectToListAppend(), false));
$this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=###views###' . $this->getRedirectToListAppend(), false));
return parent::batch($model);
}
@ -180,13 +180,13 @@ class ###View###Controller extends FormController
$cancel = parent::cancel($key);
if (!is_null($return) && Uri::isInternal(base64_decode($return)))
if (!is_null($return) && Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::isInternal(base64_decode($return)))
{
$redirect = base64_decode($return);
// Redirect to the return value.
$this->setRedirect(
Route::_(
Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_(
$redirect, false
)
);
@ -197,7 +197,7 @@ class ###View###Controller extends FormController
// Redirect to the item screen.
$this->setRedirect(
Route::_(
Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -208,7 +208,7 @@ class ###View###Controller extends FormController
// Redirect to the list screen.
$this->setRedirect(
Route::_(
Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -234,7 +234,7 @@ class ###View###Controller extends FormController
// Check if there is a return value
$return = $this->input->get('return', null, 'base64');
$canReturn = (!is_null($return) && Uri::isInternal(base64_decode($return)));
$canReturn = (!is_null($return) && Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::isInternal(base64_decode($return)));
if ($this->ref || $this->refid || $canReturn)
{
@ -252,7 +252,7 @@ class ###View###Controller extends FormController
// Redirect to the return value.
$this->setRedirect(
Route::_(
Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_(
$redirect, false
)
);
@ -263,7 +263,7 @@ class ###View###Controller extends FormController
// Redirect to the item screen.
$this->setRedirect(
Route::_(
Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_(
'index.php?option=' . $this->option . $redirect, false
)
);
@ -274,7 +274,7 @@ class ###View###Controller extends FormController
// Redirect to the list screen.
$this->setRedirect(
Route::_(
Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_(
'index.php?option=' . $this->option . $redirect, false
)
);

View File

@ -118,7 +118,7 @@ class HtmlView extends BaseHtmlView
public function display($tpl = null)
{
// set params
$this->params = ComponentHelper::getParams('com_###component###');
$this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
$this->useCoreUI = true;
// Assign the variables
$this->form ??= $this->get('Form');
@ -129,7 +129,7 @@ class HtmlView extends BaseHtmlView
// get action permissions
$this->canDo = ###Component###Helper::getActions('###view###', $this->item);
// get input
$jinput = Factory::getApplication()->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');
@ -211,16 +211,16 @@ class HtmlView extends BaseHtmlView
protected function _prepareDocument(): void
{###JQUERY###
$isNew = ($this->item->id < 1);
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
$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)
{
Html::_('stylesheet', $style, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
}###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
// add scripts
foreach ($this->scripts as $script)
{
Html::_('script', $script, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
}###DOCUMENT_CUSTOM_PHP###
}
}

View File

@ -234,7 +234,7 @@ class ###View###Model extends AdminModel
*/
protected function prepareTable($table)
{###LICENSE_TABLE_LOCKED_CHECK###
$date = Factory::getDate();
$date = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getDate();
$user = $this->getCurrentUser();
if (isset($table->name))
@ -291,7 +291,7 @@ class ###View###Model extends AdminModel
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = Factory::getApplication()->getUserState('com_###component###.edit.###view###.data', []);
$data = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getUserState('com_###component###.edit.###view###.data', []);
if (empty($data))
{
@ -368,7 +368,7 @@ class ###View###Model extends AdminModel
if (empty($pks))
{
$this->setError(Text::_('JGLOBAL_NO_ITEM_SELECTED'));
$this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JGLOBAL_NO_ITEM_SELECTED'));
return false;
}
@ -385,7 +385,7 @@ class ###View###Model extends AdminModel
if (!$this->canDo->get('core.batch'))
{
$this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
$this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
@ -428,7 +428,7 @@ class ###View###Model extends AdminModel
if (!$done)
{
$this->setError(Text::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
$this->setError(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JLIB_APPLICATION_ERROR_INSUFFICIENT_BATCH_INFORMATION'));
return false;
}
@ -449,7 +449,7 @@ class ###View###Model extends AdminModel
*/
public function save($data)
{
$input = Factory::getApplication()->input;
$input = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input;
$filter = InputFilter::getInstance();
// set the metadata to the Item Data

View File

@ -67,7 +67,7 @@ class AjaxController extends BaseController
// return to a callback function
$callback = $jinput->get('callback', null, 'CMD');
// Check Token!
$token = Session::getFormToken();
$token = Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($jinput->get($token, 0, 'ALNUM') || $token === $call_token)
{

View File

@ -56,7 +56,7 @@ class AjaxModel extends ListModel
{
parent::__construct($config, $factory);
$this->app_params = ComponentHelper::getParams('com_###component###');
$this->app ??= Factory::getApplication();
$this->app_params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
}###AJAX_SITE_MODEL_METHODS###
}

View File

@ -65,7 +65,7 @@ class DisplayController extends BaseController
*/
public function __construct($config = [], MVCFactoryInterface $factory = null, $app = null, $input = null)
{
$app ??= Factory::getApplication();
$app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$this->identity ??= $app->getIdentity();
parent::__construct($config, $factory, $app, $input);
@ -108,21 +108,21 @@ class DisplayController extends BaseController
if ($refid > 0 && Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($ref))
{
// redirect to item of ref
$this->setRedirect(Route::_('index.php?option=com_###component###&view=' . (string) $ref . '&layout=edit&id=' . (int) $refid, false));
$this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=' . (string) $ref . '&layout=edit&id=' . (int) $refid, false));
}
elseif (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($ref))
{
// redirect to ref
$this->setRedirect(Route::_('index.php?option=com_###component###&view=' . (string) $ref, false));
$this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=' . (string) $ref, false));
}
else
{
// normal redirect back to the list default site view
$this->setRedirect(Route::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###', false));
$this->setRedirect(Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=###SITE_DEFAULT_VIEW###', false));
}
// Somehow the person just went to the form - we don't allow that.
throw new \Exception(Text::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id), 403);
throw new \Exception(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id), 403);
}
// we may need to make this more dynamic in the future. (TODO)

View File

@ -0,0 +1,74 @@
<?php
/**
* @package Joomla.Component.Builder
*
* @created 4th September 2022
* @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
*/
// No direct access to this JCB template file (EVER)
defined('_JCB_TEMPLATE') or die;
?>
###BOM###
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\Field;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Field\ModalSelectField as ModalSelectFieldCore;
use Joomla\Database\ParameterType;
// No direct access to this file
\defined('_JEXEC') or die;
/**
* A modal content selection field, now with the radical ability to handle string-based GUIDs.
* Because, apparently, assuming everything is an integer was the hill to die on.
*
* This override exists solely to bypass a hardcoded constraint that shouldn't have been there in the first place.
* But hey, at least we get another class extension to maintain!
*
* @since 5.0.0
*/
class ModalSelectField extends ModalSelectFieldCore
{
/**
* Method to retrieve the title of selected item.
*
* @return string
*
* @since 5.0.0
*/
protected function getValueTitle()
{
// Selecting the title for the field value, when required info were given
if ($this->value && $this->sql_title_table && $this->sql_title_column && $this->sql_title_key) {
try {
$db = $this->getDatabase();
$query = $db->getQuery(true)
->select($db->quoteName($this->sql_title_column))
->from($db->quoteName($this->sql_title_table))
->where($db->quoteName($this->sql_title_key) . ' = :value')
->bind(':value', $this->value, is_numeric($this->value) ? ParameterType::INTEGER : ParameterType::STRING);
/**
* All this—just because someone decided to hardcode [ParameterType::INTEGER] in the core.
* We could have just handle it dynamically, but no...
*
* Polymorphic behavior isn't the enemy. Hardcoded constraints that force class extensions?
* Now *that's* the real problem. But sure, let's keep pretending that integers are the
* only valid identifiers in a database.
*/
$db->setQuery($query);
return $db->loadResult() ?: $this->value;
} catch (\Throwable $e) {
Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');
}
}
return $this->value;
}
}

View File

@ -51,7 +51,7 @@ class HeaderCheck
public function __construct()
{
// Initializes the application object.
$this->app ??= Factory::getApplication();
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
// Initializes the document object.
$this->document = $this->app->getDocument();

View File

@ -115,7 +115,7 @@ abstract class ###Component###Helper
public static function getContributors()
{
// get params
$params = ComponentHelper::getParams('com_###component###');
$params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
// start contributors array
$contributors = [];
// get all Contributors (max 20)
@ -172,7 +172,7 @@ abstract class ###Component###Helper
}
// Get the model through the MVCFactory
return Factory::getApplication()->bootComponent('com_' . $component)->getMVCFactory()->createModel($type, $prefix, $config);
return Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->bootComponent('com_' . $component)->getMVCFactory()->createModel($type, $prefix, $config);
}
/**
@ -242,7 +242,7 @@ abstract class ###Component###Helper
if (!$asset->check() || !$asset->store())
{
Factory::getApplication()->enqueueMessage($asset->getError(), 'warning');
Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->enqueueMessage($asset->getError(), 'warning');
return false;
}
else
@ -255,7 +255,7 @@ abstract class ###Component###Helper
$object->asset_id = (int) $asset->id;
// Update their asset_id to link to the asset table.
return Factory::getDbo()->updateObject('#__###component###_'.$table, $object, 'id');
return Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getDbo()->updateObject('#__###component###_'.$table, $object, 'id');
}
}
return false;
@ -272,7 +272,7 @@ abstract class ###Component###Helper
if (!$inherit)
{
// Need to find the asset id by the name of the component.
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class);
$query = $db->getQuery(true)
->select($db->quoteName('id'))
->from($db->quoteName('#__assets'))
@ -497,7 +497,7 @@ abstract class ###Component###Helper
{
$type = 'item';
}
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class);
$query = $db->getQuery(true);
$query->select(array('a.published'));
$query->from('#__###component###_'.$type.' AS a');
@ -515,7 +515,7 @@ abstract class ###Component###Helper
public static function getGroupName($id)
{
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class);
$query = $db->getQuery(true);
$query->select(array('a.title'));
$query->from('#__usergroups AS a');
@ -549,7 +549,7 @@ abstract class ###Component###Helper
if (!Super___91004529_94a9_4590_b842_e7c6b624ecf5___Power::check($user))
{
// get the user object
$user = Factory::getApplication()->getIdentity();
$user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();
}
// load the CMSObject
$result = new CMSObject;

View File

@ -41,10 +41,10 @@ class HelpController extends BaseController
public function help()
{
$user = Factory::getApplication()->getIdentity();
$jinput = Factory::getApplication()->input;
$user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();
$jinput = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->input;
// Check Token!
$token = Session::getFormToken();
$token = Joomla___5ba38513_5c4f_4b0d_935e_49e986a6bce8___Power::getFormToken();
$call_token = $jinput->get('token', 0, 'ALNUM');
if($user->id != 0 && ($jinput->get($token, 0, 'ALNUM') || $token === $call_token))
{
@ -83,7 +83,7 @@ class HelpController extends BaseController
protected function getHelpDocumentText($id)
{
$db = Factory::getContainer()->get(DatabaseInterface::class);
$db = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getContainer()->get(DatabaseInterface::class);
$query = $db->getQuery(true);
$query->select(array('a.title','a.content'));
$query->from('#__###component###_help_document AS a');
@ -97,18 +97,18 @@ class HelpController extends BaseController
$text = [];
$document = $db->loadObject();
// fix image issue
$images['src="images'] = 'src="'.Uri::root().'images';
$images["src='images"] = "src='".Uri::root()."images";
$images['src="/images'] = 'src="'.Uri::root().'images';
$images["src='/images"] = "src='".Uri::root()."images";
$images['src="images'] = 'src="'.Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root().'images';
$images["src='images"] = "src='".Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root()."images";
$images['src="/images'] = 'src="'.Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root().'images';
$images["src='/images"] = "src='".Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root()."images";
// set document template
$text[] = "<!doctype html>";
$text[] = '<html>';
$text[] = "<head>";
$text[] = '<meta charset="utf-8">';
$text[] = "<title>".$document->title."</title>";
$text[] = '<link type="text/css" href="'.Uri::root().'media/com_###component###/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>';
$text[] = '<script type="text/javascript" src="'.Uri::root().'media/com_###component###/uikit/js/uikit.min.js"></script>';
$text[] = '<link type="text/css" href="'.Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root().'media/com_###component###/uikit/css/uikit.gradient.min.css" rel="stylesheet"></link>';
$text[] = '<script type="text/javascript" src="'.Joomla___eecc143e_b5cf_4c33_ba4d_97da1df61422___Power::root().'media/com_###component###/uikit/js/uikit.min.js"></script>';
$text[] = "</head>";
$text[] = '<body><br />';
$text[] = '<div class="uk-container uk-container-center uk-grid-collapse">';

View File

@ -85,7 +85,7 @@ class Router extends RouterView
{
$this->categoryFactory = $categoryFactory;
$this->db = $db;
$this->params = ComponentHelper::getParams('com_###component###');
$this->params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
$this->noIDs = (bool) $this->params->get('sef_ids', false);###SITE_ROUTER_CONSTRUCTOR_BEFORE_PARENT###
parent::__construct($app, $menu);###SITE_ROUTER_CONSTRUCTOR_AFTER_PARENT###

View File

@ -36,7 +36,7 @@ abstract class RouteHelper
protected static function _findItem($needles = null,$type = null)
{
$app = Factory::getApplication();
$app = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$menus = $app->getMenu('site');
$language = isset($needles['language']) ? $needles['language'] : '*';
@ -45,7 +45,7 @@ abstract class RouteHelper
{
self::$lookup[$language] = [];
$component = ComponentHelper::getComponent('com_###component###');
$component = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getComponent('com_###component###');
$attributes = array('component_id');
$values = array($component->id);
@ -116,7 +116,7 @@ abstract class RouteHelper
if ($type)
{
// Check if the global menu item has been set.
$params = ComponentHelper::getParams('com_###component###');
$params = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###');
if ($item = $params->get($type.'_menu', 0))
{
return $item;

View File

@ -87,7 +87,7 @@ class HtmlView extends BaseHtmlView
public function display($tpl = null): void
{
// get combined params of both component and menu
$this->app ??= Factory::getApplication();
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$this->params = $this->app->getParams();
$this->menu = $this->app->getMenu()->getActive();
$this->styles = $this->get('Styles');
@ -109,12 +109,12 @@ class HtmlView extends BaseHtmlView
// add styles
foreach ($this->styles as $style)
{
Html::_('stylesheet', $style, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
}###SITE_DOCUMENT_CUSTOM_CSS###
// add scripts
foreach ($this->scripts as $script)
{
Html::_('script', $script, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
}###SITE_DOCUMENT_CUSTOM_JS######SITE_JAVASCRIPT_FOR_BUTTONS###
}
@ -131,7 +131,7 @@ class HtmlView extends BaseHtmlView
$this->help_url = ###Component###Helper::getHelpUrl('###sviews###');
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar

View File

@ -122,7 +122,7 @@ class ###SViews###Model extends ListModel
{
parent::__construct($config, $factory);
$this->app ??= Factory::getApplication();
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$this->input ??= $this->app->getInput();
// Set the current user for authorisation checks (for those calling this model directly)
@ -160,7 +160,7 @@ class ###SViews###Model extends ListModel
$items = parent::getItems();
// Get the global params
$globalParams = ComponentHelper::getParams('com_###component###', true);###SITE_GET_ITEMS######SITE_AFTER_GET_ITEMS###
$globalParams = Joomla___aeb8e463_291f_4445_9ac4_34b637c12dbd___Power::getParams('com_###component###', true);###SITE_GET_ITEMS######SITE_AFTER_GET_ITEMS###
// return items
return $items;

View File

@ -71,7 +71,7 @@ class HtmlView extends BaseHtmlView
public function display($tpl = null): void
{
// get combined params of both component and menu
$this->app ??= Factory::getApplication();
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$this->params = $this->app->getParams();
$this->menu = $this->app->getMenu()->getActive();
$this->styles = $this->get('Styles') ?? [];
@ -93,12 +93,12 @@ class HtmlView extends BaseHtmlView
// add styles
foreach ($this->styles as $style)
{
Html::_('stylesheet', $style, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('stylesheet', $style, ['version' => 'auto']);
}###SITE_DOCUMENT_CUSTOM_CSS###
// add scripts
foreach ($this->scripts as $script)
{
Html::_('script', $script, ['version' => 'auto']);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', $script, ['version' => 'auto']);
}###SITE_DOCUMENT_CUSTOM_JS######SITE_JAVASCRIPT_FOR_BUTTONS###
}
@ -115,7 +115,7 @@ class HtmlView extends BaseHtmlView
$this->help_url = ###Component###Helper::getHelpUrl('###sview###');
if (Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::check($this->help_url))
{
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
Joomla___0c1a176a_304f_433a_8233_37d01ff87815___Power::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
}
// now initiate the toolbar

View File

@ -139,7 +139,7 @@ class ###SView###Model extends ItemModel
{
parent::__construct($config, $factory);
$this->app ??= Factory::getApplication();
$this->app ??= Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication();
$this->input ??= $this->app->getInput();
// Set the current user for authorisation checks (for those calling this model directly)

View File

@ -22,5 +22,5 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED###
?>
<p><?php echo Text::_('COM_###COMPONENT###_###VIEWS###_BATCH_TIP'); ?></p>
<p><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_###VIEWS###_BATCH_TIP'); ?></p>
<?php echo $this->batchDisplay; ?>

View File

@ -22,9 +22,9 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED###
?>
<!-- clear the batch values if cancel -->
<button class="btn" type="button" onclick="###BATCH_ONCLICK_CANCEL_SCRIPT###" data-dismiss="modal">
<?php echo Text::_('JCANCEL'); ?>
<?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JCANCEL'); ?>
</button>
<!-- post the batch values if process -->
<button class="btn btn-success" type="submit" onclick="Joomla.submitbutton('###view###.batch');">
<?php echo Text::_('JGLOBAL_BATCH_PROCESS'); ?>
<?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JGLOBAL_BATCH_PROCESS'); ?>
</button>

View File

@ -21,10 +21,10 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
// No direct access to this file
defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED###
Html::_('jquery.framework');
Html::_('bootstrap.tooltip');
Html::_('script', 'system/core.js', false, true);
Html::_('behavior.keepalive');
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('jquery.framework');
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('bootstrap.tooltip');
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', 'system/core.js', false, true);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('behavior.keepalive');
?>
<script type="text/javascript">
@ -41,7 +41,7 @@ Joomla.continueImport = function() {
}
// do field validation
if (error) {
alert("<?php echo Text::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS', true); ?>");
alert("<?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_SELECT_ALL_COLUMNS', true); ?>");
} else {
document.getElementById('loading').style.display = 'block';
form.gettype.value = 'continue';
@ -53,7 +53,7 @@ Joomla.submitbutton = function() {
var form = document.getElementById('adminForm');
// do field validation
if (form.import_package.value == "") {
alert("<?php echo Text::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_SELECT_A_FILE', true); ?>");
alert("<?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_SELECT_A_FILE', true); ?>");
} else {
document.getElementById('loading').style.display = 'block';
form.gettype.value = 'upload';
@ -65,7 +65,7 @@ Joomla.submitbutton3 = function() {
var form = document.getElementById('adminForm');
// do field validation
if (form.import_directory.value == ""){
alert("<?php echo Text::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_SELECT_A_DIRECTORY', true); ?>");
alert("<?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_PLEASE_SELECT_A_DIRECTORY', true); ?>");
} else {
document.getElementById('loading').style.display = 'block';
form.gettype.value = 'folder';
@ -77,7 +77,7 @@ Joomla.submitbutton4 = function() {
var form = document.getElementById('adminForm');
// do field validation
if (form.import_url.value == "" || form.import_url.value == "http://") {
alert("<?php echo Text::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL', true); ?>");
alert("<?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_MSG_ENTER_A_URL', true); ?>");
} else {
document.getElementById('loading').style.display = 'block';
form.gettype.value = 'url';
@ -111,16 +111,16 @@ document.addEventListener('DOMContentLoaded', function() {
</script>
<div id="installer-import" class="clearfix">
<form enctype="multipart/form-data" action="<?php echo Route::_('index.php?option=com_###component###&view=import');?>" method="post" name="adminForm" id="adminForm" class="form-horizontal form-validate">
<form enctype="multipart/form-data" action="<?php echo Joomla___d4c76099_4c32_408a_8701_d0a724484dfd___Power::_('index.php?option=com_###component###&view=import');?>" method="post" name="adminForm" id="adminForm" class="form-horizontal form-validate">
<div id="main-card">
<?php if ($this->hasPackage && Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($this->headerList) && Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($this->headers)) : ?>
<fieldset class="uploadform">
<legend><?php echo Text::_('COM_###COMPONENT###_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'); ?></legend>
<legend><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_LINK_FILE_TO_TABLE_COLUMNS'); ?></legend>
<div class="control-group">
<label class="control-label" ><h4><?php echo Text::_('COM_###COMPONENT###_IMPORT_TABLE_COLUMNS'); ?></h4></label>
<label class="control-label" ><h4><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_TABLE_COLUMNS'); ?></h4></label>
<div class="controls">
<label class="control-label" ><h4><?php echo Text::_('COM_###COMPONENT###_IMPORT_FILE_COLUMNS'); ?></h4></label>
<label class="control-label" ><h4><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_FILE_COLUMNS'); ?></h4></label>
</div>
</div>
<?php foreach($this->headerList as $name => $title): ?>
@ -128,8 +128,8 @@ document.addEventListener('DOMContentLoaded', function() {
<label for="<?php echo $name; ?>" class="control-label" ><?php echo $title; ?></label>
<div class="controls">
<select name="<?php echo $name; ?>" id="vdm_<?php echo $name; ?>" required class="required input_box" >
<option value=""><?php echo Text::_('COM_###COMPONENT###_IMPORT_PLEASE_SELECT_COLUMN'); ?></option>
<option value="IGNORE"><?php echo Text::_('COM_###COMPONENT###_IMPORT_IGNORE_COLUMN'); ?></option>
<option value=""><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_PLEASE_SELECT_COLUMN'); ?></option>
<option value="IGNORE"><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_IGNORE_COLUMN'); ?></option>
<?php foreach($this->headers as $value => $option): ?>
<?php $selected = (strtolower($option) == strtolower ($title) || strtolower($option) == strtolower($name))? 'selected="selected"':''; ?>
<option value="<?php echo Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($value); ?>" class="required" <?php echo $selected ?>><?php echo Super___1f28cb53_60d9_4db1_b517_3c7dc6b429ef___Power::html($option); ?></option>
@ -139,61 +139,61 @@ document.addEventListener('DOMContentLoaded', function() {
</div>
<?php endforeach; ?>
<div class="form-actions">
<input class="btn btn-primary" type="button" value="<?php echo Text::_('COM_###COMPONENT###_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueImport()" />
<input class="btn btn-primary" type="button" value="<?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_CONTINUE'); ?>" onclick="Joomla.continueImport()" />
</div>
</fieldset>
<input type="hidden" name="gettype" value="continue" />
<?php else: ?>
<?php echo Html::_('uitab.startTabSet', 'myTab', array('active' => 'upload')); ?>
<?php echo Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('uitab.startTabSet', 'myTab', array('active' => 'upload')); ?>
<?php echo Html::_('uitab.addTab', 'myTab', 'upload', Text::_('COM_###COMPONENT###_IMPORT_FROM_UPLOAD', true)); ?>
<?php echo Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('uitab.addTab', 'myTab', 'upload', Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_FROM_UPLOAD', true)); ?>
<fieldset class="uploadform">
<legend><?php echo Text::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
<legend><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
<div class="control-group">
<label for="import_package" class="control-label"><?php echo Text::_('COM_###COMPONENT###_IMPORT_SELECT_FILE'); ?></label>
<label for="import_package" class="control-label"><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_SELECT_FILE'); ?></label>
<div class="controls">
<input class="input_box" id="import_package" name="import_package" type="file" size="57" />
</div>
</div>
<div class="form-actions">
<input class="btn btn-primary" type="button" value="<?php echo Text::_('COM_###COMPONENT###_IMPORT_UPLOAD_BOTTON'); ?>" onclick="Joomla.submitbutton()" />&nbsp;&nbsp;&nbsp;<small><?php echo Text::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
<input class="btn btn-primary" type="button" value="<?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_UPLOAD_BOTTON'); ?>" onclick="Joomla.submitbutton()" />&nbsp;&nbsp;&nbsp;<small><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
</div>
</fieldset>
<?php echo Html::_('uitab.endTab'); ?>
<?php echo Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('uitab.endTab'); ?>
<?php echo Html::_('uitab.addTab', 'myTab', 'directory', Text::_('COM_###COMPONENT###_IMPORT_FROM_DIRECTORY', true)); ?>
<?php echo Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('uitab.addTab', 'myTab', 'directory', Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_FROM_DIRECTORY', true)); ?>
<fieldset class="uploadform">
<legend><?php echo Text::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
<legend><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
<div class="control-group">
<label for="import_directory" class="control-label"><?php echo Text::_('COM_###COMPONENT###_IMPORT_SELECT_FILE_DIRECTORY'); ?></label>
<label for="import_directory" class="control-label"><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_SELECT_FILE_DIRECTORY'); ?></label>
<div class="controls">
<input type="text" id="import_directory" name="import_directory" class="span5 input_box" size="70" value="<?php echo $this->state->get('import.directory'); ?>" />
</div>
</div>
<div class="form-actions">
<input type="button" class="btn btn-primary" value="<?php echo Text::_('COM_###COMPONENT###_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton3()" />&nbsp;&nbsp;&nbsp;<small><?php echo Text::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
<input type="button" class="btn btn-primary" value="<?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton3()" />&nbsp;&nbsp;&nbsp;<small><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
</div>
</fieldset>
<?php echo Html::_('uitab.endTab'); ?>
<?php echo Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('uitab.endTab'); ?>
<?php echo Html::_('uitab.addTab', 'myTab', 'url', Text::_('COM_###COMPONENT###_IMPORT_FROM_URL', true)); ?>
<?php echo Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('uitab.addTab', 'myTab', 'url', Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_FROM_URL', true)); ?>
<fieldset class="uploadform">
<legend><?php echo Text::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
<legend><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_UPDATE_DATA'); ?></legend>
<div class="control-group">
<label for="import_url" class="control-label"><?php echo Text::_('COM_###COMPONENT###_IMPORT_SELECT_FILE_URL'); ?></label>
<label for="import_url" class="control-label"><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_SELECT_FILE_URL'); ?></label>
<div class="controls">
<input type="text" id="import_url" name="import_url" class="span5 input_box" size="70" value="http://" />
</div>
</div>
<div class="form-actions">
<input type="button" class="btn btn-primary" value="<?php echo Text::_('COM_###COMPONENT###_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton4()" />&nbsp;&nbsp;&nbsp;<small><?php echo Text::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
<input type="button" class="btn btn-primary" value="<?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_GET_BOTTON'); ?>" onclick="Joomla.submitbutton4()" />&nbsp;&nbsp;&nbsp;<small><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_IMPORT_FORMATS_ACCEPTED'); ?> (.csv .xls .ods)</small>
</div>
</fieldset>
<?php echo Html::_('uitab.endTab'); ?>
<?php echo Html::_('uitab.endTabSet'); ?>
<?php echo Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('uitab.endTab'); ?>
<?php echo Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('uitab.endTabSet'); ?>
<input type="hidden" name="gettype" value="upload" />
<?php endif; ?>
<input type="hidden" name="task" value="import.import" />
<?php echo Html::_('form.token'); ?>
<?php echo Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('form.token'); ?>
</form>
</div>

View File

@ -22,9 +22,9 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
// No direct access to this file
defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED###
Html::_('jquery.framework');
Html::_('bootstrap.tooltip');
Html::_('script', 'system/core.js', false, true);
Html::_('behavior.keepalive');
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('jquery.framework');
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('bootstrap.tooltip');
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('script', 'system/core.js', false, true);
Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('behavior.keepalive');
?>###IMPORT_DEFAULT_VIEW_CUSTOM###

View File

@ -26,12 +26,12 @@ defined('_JEXEC') or die;
<div class="dashboard-content">
<a class="icon" href="<?php echo $icon->url; ?>">
<img alt="<?php echo $icon->alt; ?>" src="components/com_###component###/assets/images/icons/<?php echo $icon->image; ?>">
<span class="dashboard-title"><?php echo Text::_($icon->name); ?></span>
<span class="dashboard-title"><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_($icon->name); ?></span>
</a>
</div>
</div>
<?php endforeach; ?>
<div class="clearfix"></div>
<?php else: ?>
<div class="alert alert-error"><h4 class="alert-heading"><?php echo Text::_("Permission denied, or not correctly set"); ?></h4><div class="alert-message"><?php echo Text::_("Please notify your System Administrator if result is unexpected."); ?></div></div>
<div class="alert alert-error"><h4 class="alert-heading"><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_("Permission denied, or not correctly set"); ?></h4><div class="alert-message"><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_("Please notify your System Administrator if result is unexpected."); ?></div></div>
<?php endif; ?>

View File

@ -23,30 +23,30 @@ defined('_JEXEC') or die;###LICENSE_LOCKED_DEFINED###
?>
<div id="filter-bar" class="btn-toolbar">
<div class="filter-search btn-group pull-left">
<label for="filter_search" class="element-invisible"><?php echo Text::_('Search');?></label>
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo Text::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo Html::tooltipText('Search ###Views###'); ?>" />
<label for="filter_search" class="element-invisible"><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('Search');?></label>
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::tooltipText('Search ###Views###'); ?>" />
</div>
<div class="btn-group pull-left">
<button type="submit" class="btn hasTooltip" title="<?php echo Html::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button type="button" class="btn hasTooltip" title="<?php echo Html::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
<button type="submit" class="btn hasTooltip" title="<?php echo Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button type="button" class="btn hasTooltip" title="<?php echo Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="limit" class="element-invisible"><?php echo Text::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
<label for="limit" class="element-invisible"><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC');?></label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<div class="btn-group pull-right hidden-phone">
<label for="directionTable" class="element-invisible"><?php echo Text::_('JFIELD_ORDERING_DESC');?></label>
<label for="directionTable" class="element-invisible"><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JFIELD_ORDERING_DESC');?></label>
<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()">
<option value=""><?php echo Text::_('JFIELD_ORDERING_DESC');?></option>
<option value="asc" <?php if ($this->listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo Text::_('JGLOBAL_ORDER_ASCENDING');?></option>
<option value="desc" <?php if ($this->listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo Text::_('JGLOBAL_ORDER_DESCENDING');?></option>
<option value=""><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JFIELD_ORDERING_DESC');?></option>
<option value="asc" <?php if ($this->listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JGLOBAL_ORDER_ASCENDING');?></option>
<option value="desc" <?php if ($this->listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JGLOBAL_ORDER_DESCENDING');?></option>
</select>
</div>
<div class="btn-group pull-right">
<label for="sortTable" class="element-invisible"><?php echo Text::_('JGLOBAL_SORT_BY');?></label>
<label for="sortTable" class="element-invisible"><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JGLOBAL_SORT_BY');?></label>
<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()">
<option value=""><?php echo Text::_('JGLOBAL_SORT_BY');?></option>
<?php echo Html::_('select.options', $this->getSortFields(), 'value', 'text', $this->listOrder);?>
<option value=""><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('JGLOBAL_SORT_BY');?></option>
<?php echo Joomla___34690c75_1090_47eb_8c06_7228dc7eedd6___Power::_('select.options', $this->getSortFields(), 'value', 'text', $this->listOrder);?>
</select>
</div>
</div>

View File

@ -20,21 +20,21 @@ use Joomla\CMS\Language\Text;
defined('_JEXEC') or die;
?>
<img alt="<?php echo Text::_('COM_###COMPONENT###'); ?>" width="100%" src="components/com_###component###/assets/images/vdm-component.###COMP_IMAGE_TYPE###">
<img alt="<?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###'); ?>" width="100%" src="components/com_###component###/assets/images/vdm-component.###COMP_IMAGE_TYPE###">
<ul class="list-striped">
<li><b><?php echo Text::_('COM_###COMPONENT###_VERSION'); ?>:</b> <?php echo $this->manifest->version; ?>&nbsp;&nbsp;<span class="update-notice" id="component-update-notice"></span></li>
<li><b><?php echo Text::_('COM_###COMPONENT###_DATE'); ?>:</b> <?php echo $this->manifest->creationDate; ?></li>
<li><b><?php echo Text::_('COM_###COMPONENT###_AUTHOR'); ?>:</b> <a href="mailto:<?php echo $this->manifest->authorEmail; ?>"><?php echo $this->manifest->author; ?></a></li>
<li><b><?php echo Text::_('COM_###COMPONENT###_WEBSITE'); ?>:</b> <a href="<?php echo $this->manifest->authorUrl; ?>" target="_blank"><?php echo $this->manifest->authorUrl; ?></a></li>
<li><b><?php echo Text::_('COM_###COMPONENT###_LICENSE'); ?>:</b> <?php echo $this->manifest->license; ?></li>
<li><b><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_VERSION'); ?>:</b> <?php echo $this->manifest->version; ?>&nbsp;&nbsp;<span class="update-notice" id="component-update-notice"></span></li>
<li><b><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_DATE'); ?>:</b> <?php echo $this->manifest->creationDate; ?></li>
<li><b><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_AUTHOR'); ?>:</b> <a href="mailto:<?php echo $this->manifest->authorEmail; ?>"><?php echo $this->manifest->author; ?></a></li>
<li><b><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_WEBSITE'); ?>:</b> <a href="<?php echo $this->manifest->authorUrl; ?>" target="_blank"><?php echo $this->manifest->authorUrl; ?></a></li>
<li><b><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_LICENSE'); ?>:</b> <?php echo $this->manifest->license; ?></li>
<li><b><?php echo $this->manifest->copyright; ?></b></li>
</ul>
<div class="clearfix"></div>
<?php if(Super___0a59c65c_9daf_4bc9_baf4_e063ff9e6a8a___Power::check($this->contributors)): ?>
<?php if(count($this->contributors) > 1): ?>
<h3><?php echo Text::_('COM_###COMPONENT###_CONTRIBUTORS'); ?></h3>
<h3><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_CONTRIBUTORS'); ?></h3>
<?php else: ?>
<h3><?php echo Text::_('COM_###COMPONENT###_CONTRIBUTOR'); ?></h3>
<h3><?php echo Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_('COM_###COMPONENT###_CONTRIBUTOR'); ?></h3>
<?php endif; ?>
<ul class="list-striped">
<?php foreach($this->contributors as $contributor): ?>

View File

@ -24,7 +24,7 @@ defined('_JEXEC') or die;
// set the defaults
$items = $displayData->###LAYOUTITEMS###;
$user = Factory::getApplication()->getIdentity();
$user = Joomla___39403062_84fb_46e0_bac4_0023f766e827___Power::getApplication()->getIdentity();
$id = $displayData->item->id;
###LAYOUTITEMSHEADER###

View File

@ -27,7 +27,7 @@ $fieldSets = $form->getFieldsets('metadata');
<?php foreach ($fieldSets as $name => $fieldSet) : ?>
<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?>
<p class="alert alert-info"><?php echo $this->escape(Text::_($fieldSet->description)); ?></p>
<p class="alert alert-info"><?php echo $this->escape(Joomla___ba6326ef_cb79_4348_80f4_ab086082e3c5___Power::_($fieldSet->description)); ?></p>
<?php endif; ?>
<?php

View File

@ -328,6 +328,12 @@
"newName": "default.php",
"type": "single"
},
"ADMIN_VIEW_MODAL.php": {
"path": "c0mp0n3nt/admin/tmpl/[[[name]]]",
"rename": "new",
"newName": "modal.php",
"type": "single"
},
"ADMIN_VIEW_MODEL.php": {
"path": "c0mp0n3nt/admin/src/Model",
"rename": "new",
@ -386,6 +392,12 @@
"newName": "default.php",
"type": "list"
},
"ADMIN_VIEWS_MODAL.php": {
"path": "c0mp0n3nt/admin/tmpl/[[[name]]]",
"rename": "new",
"newName": "modal.php",
"type": "list"
},
"ADMIN_VIEWS_EMPTYSTATE.php": {
"path": "c0mp0n3nt/admin/tmpl/[[[name]]]",
"rename": "new",
@ -464,6 +476,12 @@
"newName": "[[[Key]]]Field.php",
"type": "fieldcustom"
},
"FORM_MODAL_SELECT_FIELD.php": {
"path": "c0mp0n3nt/admin/src/Field",
"rename": "new",
"newName": "ModalSelectField.php",
"type": "fieldmodalselect_override"
},
"FORM_LIST_FIELD.php": {
"path": "c0mp0n3nt/admin/src/Field",
"rename": "new",
@ -743,6 +761,12 @@
"newName": "[[[Key]]]Field.php",
"type": "fieldcustom"
},
"SITE_FORM_MODAL_SELECT_FIELD.php": {
"path": "c0mp0n3nt/site/src/Field",
"rename": "new",
"newName": "ModalSelectField.php",
"type": "fieldmodalselect_override"
},
"SITE_FORM_LIST_FIELD.php": {
"path": "c0mp0n3nt/site/src/Field",
"rename": "new",
@ -874,4 +898,4 @@
}
}
}
}
}