Method |
Description |
|
__construct ( View $view, array $config = [] ) |
Public constructor. The config array can contain the following keys
extensions array
defaultLayout string
defaultTpl string
strictView bool
strictTpl bool
strictLayout bool
sidePrefix string
For the descriptions of each key please see the same-named property of this class |
|
addExtension ( string $extension ) : void |
Add an extension to the list of view template extensions |
|
getDefaultLayout ( ) : string |
Returns the default layout name |
|
getDefaultTpl ( ) : string |
Returns the default subtemplate name |
|
getExtensions ( ) : array |
Get the list of view template extensions |
|
getSidePrefix ( ) : string |
Returns the application side prefix which will be used by default in getViewTemplateUris. It can be one of:
site Public front-end
admin Administrator back-end
auto Automatically figure out if it should be site or admin
any First look in the current application side, then look on the other side of the application |
|
getViewTemplateUris ( array $parameters ) : array |
Returns a list of template URIs for a specific component, view, template and sub-template. The $parameters array
can have any of the following keys:
component string The name of the component, e.g. com_something
view string The name of the view
layout string The name of the layout
tpl string The name of the subtemplate
strictView bool Should I only look in the specified view, or should I look in the pluralised/singularised view as well?
strictLayout bool Should I only look for this layout, or also for the default layout?
strictTpl bool Should I only look for this subtemplate or also for no subtemplate?
sidePrefix string The application side prefix (site, admin, auto, any) |
|
isStrictLayout ( ) : boolean |
Returns the "strict layout" flag. When the flag is false we will look for a view template with both the specified
and the default template name in getViewTemplateUris. When true we will only look for the specified view
template. |
|
isStrictTpl ( ) : boolean |
Returns the "strict template" flag. When the flag is false we will look for a view template with or without the
subtemplate defined in getViewTemplateUris. If it's true we will only look for the subtemplate specified. |
|
isStrictView ( ) : boolean |
Returns the "strict view" flag. When the flag is false we will look for the view template in both the
singularised and pluralised view. If it's true we will only look for the view template in the view
specified in getViewTemplateUris. |
|
parseTemplateUri ( string $uri = '' ) : array |
Parses a template URI in the form of admin:component/view/layout to an array listing the application section
(admin, site), component, view and template referenced therein. |
|
removeExtension ( string $extension ) : void |
Remove an extension from the list of view template extensions |
|
resolveUriToPath ( string $uri, string $layoutTemplate = '', array $extraPaths = [] ) : string |
Resolves a view template URI (e.g. any:com_foobar/Items/cheese) to an absolute filesystem path
(e.g. /var/www/html/administrator/components/com_foobar/View/Items/tmpl/cheese.php) |
|
setDefaultLayout ( string $defaultLayout ) : void |
Sets the default layout name |
|
setDefaultTpl ( string $defaultTpl ) |
Sets the default subtemplate name |
|
setExtensions ( array $extensions ) : void |
Set the list of view template extensions |
|
setSidePrefix ( string $sidePrefix ) : void |
Sets the application side prefix which will be used by default in getViewTemplateUris. It can be one of:
site Public front-end
admin Administrator back-end
auto Automatically figure out if it should be site or admin
any First look in the current application side, then look on the other side of the application |
|
setStrictLayout ( boolean $strictLayout ) : void |
Sets the "strict layout" flag. When the flag is false we will look for a view template with both the specified
and the default template name in getViewTemplateUris. When true we will only look for the specified view
template. |
|
setStrictTpl ( boolean $strictTpl ) : void |
Sets the "strict template" flag. When the flag is false we will look for a view template with or without the
subtemplate defined in getViewTemplateUris. If it's true we will only look for the subtemplate specified. |
|
setStrictView ( boolean $strictView ) : void |
Sets the "strict view" flag. When the flag is false we will look for the view template in both the
singularised and pluralised view. If it's true we will only look for the view template in the view
specified in getViewTemplateUris. |
|