Release of v3.2.3-alpha1
Fix site view form missing classes in J4+. Fix permissions tab in items in J4+. Fix site display controller checkEditId function in J4+. Add class methods to the HtmlView classes in J4+. Fix broken toolbar call in HtmlView in J4+.
This commit is contained in:
@ -27,6 +27,86 @@ namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Site\View\###
|
||||
*/
|
||||
class HtmlView extends BaseHtmlView
|
||||
{
|
||||
/**
|
||||
* The item from the model
|
||||
*
|
||||
* @var mixed
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public mixed $item;
|
||||
|
||||
/**
|
||||
* The state object
|
||||
*
|
||||
* @var mixed
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public mixed $state;
|
||||
|
||||
/**
|
||||
* The form from the model
|
||||
*
|
||||
* @var mixed
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public mixed $form;
|
||||
|
||||
/**
|
||||
* The toolbar object
|
||||
*
|
||||
* @var Toolbar
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public Toolbar $toolbar;
|
||||
|
||||
/**
|
||||
* The styles url array
|
||||
*
|
||||
* @var array
|
||||
* @since 5.0.0
|
||||
*/
|
||||
protected array $styles;
|
||||
|
||||
/**
|
||||
* The scripts url array
|
||||
*
|
||||
* @var array
|
||||
* @since 5.0.0
|
||||
*/
|
||||
protected array $scripts;
|
||||
|
||||
/**
|
||||
* The actions object
|
||||
*
|
||||
* @var object
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public object $canDo;
|
||||
|
||||
/**
|
||||
* The origin referral view name
|
||||
*
|
||||
* @var string
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public string $ref;
|
||||
|
||||
/**
|
||||
* The origin referral view item id
|
||||
*
|
||||
* @var int
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public int $refid;
|
||||
|
||||
/**
|
||||
* The referral url suffix values
|
||||
*
|
||||
* @var string
|
||||
* @since 3.10.11
|
||||
*/
|
||||
public string $referral;
|
||||
|
||||
/**
|
||||
* ###View### view display method
|
||||
*
|
||||
@ -41,11 +121,11 @@ class HtmlView extends BaseHtmlView
|
||||
$this->params = ComponentHelper::getParams('com_###component###');
|
||||
$this->useCoreUI = true;
|
||||
// Assign the variables
|
||||
$this->form = $this->get('Form');
|
||||
$this->form ??= $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->state = $this->get('State');
|
||||
$this->styles = $this->get('Styles');
|
||||
$this->scripts = $this->get('Scripts');
|
||||
$this->styles = $this->get('Styles') ?? [];
|
||||
$this->scripts = $this->get('Scripts') ?? [];
|
||||
// get action permissions
|
||||
$this->canDo = ###Component###Helper::getActions('###view###', $this->item);
|
||||
// get input
|
||||
@ -97,6 +177,9 @@ class HtmlView extends BaseHtmlView
|
||||
protected function addToolbar(): void
|
||||
{
|
||||
###ADDTOOLBAR###
|
||||
|
||||
// now initiate the toolbar
|
||||
$this->toolbar ??= Toolbar::getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user