Release of v3.2.5
Add [AllowDynamicProperties] in the base view class for J5. Move the _prepareDocument above the display call in the base view class. Remove all backward compatibility issues, so JCB will not need the [Backward Compatibility] plugin to run. Added new import powers for custom import of spreadsheets. Move the setDocument and _prepareDocument above the display in the site view and custom admin view. Update the trashhelper layout to work in Joomla 5. Add AllowDynamicProperties (Joomla 4+5) to view class to allow Custom Dynamic Get methods to work without issues. Fix Save failed issue in dynamicGet. #1148. Move all [TEXT, EDITOR, TEXTAREA] fields from [NOT NULL] to [NULL]. Add the DateHelper class and improve the date methods. Add simple SessionHelper class. Add first classes for the new import engine. Improve the [VDM Registry] to be Joomla Registry Compatible. Move all registries to the [VDM Registry] class. Fix Checked Out to be null and not 0. (#1194). Fix created_by, modified_by, checked_out fields in the compiler of the SQL. (#1194). Update all core date fields in table class. (#1188). Update created_by, modified_by, checked_out fields in table class. Implementation of the decentralized Super-Power CORE repository network. (#1190). Fix the noticeboard to display Llewellyn's Joomla Social feed.
This commit is contained in:
@@ -35,6 +35,9 @@ class ###Component###View###SView### extends HtmlView
|
||||
$this->user = Factory::getUser();
|
||||
// get global action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
@@ -96,7 +99,7 @@ class ###Component###View###SView### extends HtmlView
|
||||
*/
|
||||
public function getDocument()
|
||||
{
|
||||
$this->document ??= JFactory::getDocument();
|
||||
$this->document ??= Factory::getDocument();
|
||||
|
||||
return $this->document;
|
||||
}
|
||||
|
@@ -72,11 +72,11 @@ class ###Component###View###View### extends HtmlView
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
|
||||
// Set the document
|
||||
$this->setDocument();
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +113,11 @@ class ###Component###View###View### extends HtmlView
|
||||
*/
|
||||
protected function setDocument()
|
||||
{
|
||||
// Load Core
|
||||
Html::_('behavior.core');
|
||||
// Load jQuery
|
||||
Html::_('jquery.framework');
|
||||
|
||||
$isNew = ($this->item->id < 1);
|
||||
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
|
||||
Html::_('stylesheet', "administrator/components/com_###component###/assets/css/###view###.css", ['version' => 'auto']);###AJAXTOKE######LINKEDVIEWTABLESCRIPTS###
|
||||
@@ -126,7 +131,7 @@ class ###Component###View###View### extends HtmlView
|
||||
*/
|
||||
public function getDocument()
|
||||
{
|
||||
$this->document ??= JFactory::getDocument();
|
||||
$this->document ??= Factory::getDocument();
|
||||
|
||||
return $this->document;
|
||||
}
|
||||
|
@@ -72,11 +72,11 @@ class ###Component###View###View### extends HtmlView
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
|
||||
// Set the document
|
||||
$this->setDocument();
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
|
||||
@@ -114,6 +114,11 @@ class ###Component###View###View### extends HtmlView
|
||||
*/
|
||||
protected function setDocument()
|
||||
{
|
||||
// Load Core
|
||||
Html::_('behavior.core');
|
||||
// Load jQuery
|
||||
Html::_('jquery.framework');
|
||||
|
||||
$isNew = ($this->item->id < 1);
|
||||
$this->getDocument()->setTitle(Text::_($isNew ? 'COM_###COMPONENT###_###VIEW###_NEW' : 'COM_###COMPONENT###_###VIEW###_EDIT'));
|
||||
// only add the ISIS template css & js if needed (default is 1 = true)
|
||||
@@ -139,7 +144,7 @@ class ###Component###View###View### extends HtmlView
|
||||
*/
|
||||
public function getDocument()
|
||||
{
|
||||
$this->document ??= JFactory::getDocument();
|
||||
$this->document ??= Factory::getDocument();
|
||||
|
||||
return $this->document;
|
||||
}
|
||||
|
@@ -100,4 +100,14 @@ class ###Component###ViewImport extends HtmlView
|
||||
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Document (helper method toward Joomla 4 and 5)
|
||||
*/
|
||||
public function getDocument()
|
||||
{
|
||||
$this->document ??= Factory::getDocument();
|
||||
|
||||
return $this->document;
|
||||
}
|
||||
}
|
||||
|
@@ -51,4 +51,14 @@ class ###Component###View###View### extends HtmlView
|
||||
ToolbarHelper::help('COM_###COMPONENT###_HELP_MANAGER', false, $this->help_url);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Document (helper method toward Joomla 4 and 5)
|
||||
*/
|
||||
public function getDocument()
|
||||
{
|
||||
$this->document ??= Factory::getDocument();
|
||||
|
||||
return $this->document;
|
||||
}
|
||||
}
|
||||
|
@@ -65,11 +65,11 @@ class ###Component###View###Views### extends HtmlView
|
||||
throw new Exception(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
|
||||
// Set the document
|
||||
$this->setDocument();
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -151,6 +151,11 @@ class ###Component###View###Views### extends HtmlView
|
||||
*/
|
||||
protected function setDocument()
|
||||
{
|
||||
// Load Core
|
||||
Html::_('behavior.core');
|
||||
// Load jQuery
|
||||
Html::_('jquery.framework');
|
||||
|
||||
if (!isset($this->document))
|
||||
{
|
||||
$this->document = Factory::getDocument();
|
||||
@@ -192,7 +197,7 @@ class ###Component###View###Views### extends HtmlView
|
||||
*/
|
||||
public function getDocument()
|
||||
{
|
||||
$this->document ??= JFactory::getDocument();
|
||||
$this->document ??= Factory::getDocument();
|
||||
|
||||
return $this->document;
|
||||
}###FILTERFUNCTIONS###
|
||||
|
@@ -35,6 +35,9 @@ class ###Component###View###SViews### extends HtmlView
|
||||
$this->user = Factory::getUser();
|
||||
// get global action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###sview###');###CUSTOM_ADMIN_DIPLAY_METHOD###
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
@@ -86,7 +89,7 @@ class ###Component###View###SViews### extends HtmlView
|
||||
*/
|
||||
public function getDocument()
|
||||
{
|
||||
$this->document ??= JFactory::getDocument();
|
||||
$this->document ??= Factory::getDocument();
|
||||
|
||||
return $this->document;
|
||||
}
|
||||
|
@@ -33,6 +33,9 @@ class ###Component###View###SViews### extends HtmlView
|
||||
$this->menu = $this->app->getMenu()->getActive();
|
||||
// get the user object
|
||||
$this->user = Factory::getUser();###SITE_DIPLAY_METHOD###
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}###SITE_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
@@ -78,7 +81,7 @@ class ###Component###View###SViews### extends HtmlView
|
||||
*/
|
||||
public function getDocument()
|
||||
{
|
||||
$this->document ??= JFactory::getDocument();
|
||||
$this->document ??= Factory::getDocument();
|
||||
|
||||
return $this->document;
|
||||
}
|
||||
|
@@ -33,6 +33,9 @@ class ###Component###View###SView### extends HtmlView
|
||||
$this->menu = $this->app->getMenu()->getActive();
|
||||
// get the user object
|
||||
$this->user = Factory::getUser();###SITE_DIPLAY_METHOD###
|
||||
|
||||
// Display the template
|
||||
parent::display($tpl);
|
||||
}###SITE_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
@@ -78,7 +81,7 @@ class ###Component###View###SView### extends HtmlView
|
||||
*/
|
||||
public function getDocument()
|
||||
{
|
||||
$this->document ??= JFactory::getDocument();
|
||||
$this->document ??= Factory::getDocument();
|
||||
|
||||
return $this->document;
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
@@ -89,9 +90,10 @@ class HtmlView extends BaseHtmlView
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// Assign data to the view
|
||||
$this->items = $this->get('Items');
|
||||
|
@@ -25,6 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
@@ -113,9 +114,10 @@ class HtmlView extends BaseHtmlView
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// set params
|
||||
$this->params = ComponentHelper::getParams('com_###component###');
|
||||
|
@@ -25,6 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
@@ -65,9 +66,10 @@ class HtmlView extends BaseHtmlView
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// get component params
|
||||
$this->params = ComponentHelper::getParams('com_###component###');
|
||||
@@ -82,6 +84,8 @@ class HtmlView extends BaseHtmlView
|
||||
|
||||
// Set the html view document stuff
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
@@ -105,9 +105,12 @@ class ###SViews###Model extends ListModel
|
||||
];
|
||||
|
||||
/**
|
||||
* A custom property for UIKit components. (not used unless you load v2)
|
||||
* A custom property for UI Kit components.
|
||||
*
|
||||
* @var mixed Property for storing UI Kit component-related data or objects.
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected $uikitComp;
|
||||
protected $uikitComp = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@@ -25,6 +25,7 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
@@ -33,9 +34,10 @@ class HtmlView extends BaseHtmlView
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// get component params
|
||||
$this->params = ComponentHelper::getParams('com_###component###');
|
||||
@@ -50,6 +52,8 @@ class HtmlView extends BaseHtmlView
|
||||
|
||||
// Set the html view document stuff
|
||||
$this->_prepareDocument();
|
||||
|
||||
parent::display($tpl);
|
||||
}###CUSTOM_ADMIN_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
@@ -115,10 +115,10 @@ class ###SView###Model extends ItemModel
|
||||
/**
|
||||
* A custom property for UI Kit components.
|
||||
*
|
||||
* @var array|null Property for storing UI Kit component-related data or objects.
|
||||
* @var mixed Property for storing UI Kit component-related data or objects.
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected ?array $uikitComp;
|
||||
protected $uikitComp = [];
|
||||
|
||||
/**
|
||||
* @var object item
|
||||
|
@@ -25,13 +25,17 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
#[\AllowDynamicProperties]
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
* View display method
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
function display($tpl = null)
|
||||
function display($tpl = null): void
|
||||
{
|
||||
// Assign data to the view
|
||||
$this->icons = $this->get('Icons');
|
||||
|
@@ -81,9 +81,10 @@ class HtmlView extends BaseHtmlView
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// get combined params of both component and menu
|
||||
$this->app ??= Factory::getApplication();
|
||||
@@ -93,6 +94,8 @@ class HtmlView extends BaseHtmlView
|
||||
$this->scripts = $this->get('Scripts');
|
||||
// get the user object
|
||||
$this->user ??= $this->app->getIdentity();###SITE_DIPLAY_METHOD###
|
||||
|
||||
parent::display($tpl);
|
||||
}###SITE_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
@@ -65,9 +65,10 @@ class HtmlView extends BaseHtmlView
|
||||
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
* @since 1.6
|
||||
*/
|
||||
public function display($tpl = null)
|
||||
public function display($tpl = null): void
|
||||
{
|
||||
// get combined params of both component and menu
|
||||
$this->app ??= Factory::getApplication();
|
||||
@@ -77,6 +78,8 @@ class HtmlView extends BaseHtmlView
|
||||
$this->scripts = $this->get('Scripts') ?? [];
|
||||
// get the user object
|
||||
$this->user ??= $this->getCurrentUser();###SITE_DIPLAY_METHOD###
|
||||
|
||||
parent::display($tpl);
|
||||
}###SITE_EXTRA_DIPLAY_METHODS###
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user