Piwik\Plugins\TagManager\Template\

BaseTemplate

Properties

This abstract class defines the following properties:

$RESERVED_SETTING_NAMES

Signature

  • Its type is not specified.

Methods

The abstract class defines the following methods:

  • getId() — Get the ID of this template.
  • getParameters() — Get the list of parameters that can be configured for this template.
  • getCategory() — Get the category this template belongs to.
  • getSupportedContexts() ash; Defines in which contexts this tag should be available, for example "web".
  • getName() — Get the translated name of this template.
  • getDescription() — Get the translated description of this template.
  • getHelp() — Get the translated help text for this template.
  • getOrder() — Get the order for this template.
  • getIcon() — Get the image icon url.
  • hasAdvancedSettings() — Lets you hide the advanced settings tab in the UI.
  • isCustomTemplate() — If your template allows a user to add js/html code to the site for example, you should be overwriting this method and return true.

getId()

Get the ID of this template.

The ID is by default automatically generated from the class name, but can be customized by returning a string.

Signature

  • It returns a string value.

getParameters()

Get the list of parameters that can be configured for this template.

Signature

getCategory()

Get the category this template belongs to.

Signature

  • It returns a string value.

getSupportedContexts()

Defines in which contexts this tag should be available, for example "web".

Signature

  • It returns a string[] value.

getName()

Get the translated name of this template.

Signature

  • It returns a string value.

getDescription()

Get the translated description of this template.

Signature

  • It returns a string value.

getHelp()

Get the translated help text for this template.

Signature

  • It returns a string value.

getOrder()

Get the order for this template. The lower the order is, the higher in the list the template will be shown.

Signature

  • It returns a int value.

getIcon()

Get the image icon url. We could also use data:uris to return the amount of requests to load a page like this: return 'data:image/svg+xml;base64,' . base64_encode('<svg.

..'); However, we prefer the files since we can better define them in the legal notice.

Signature

  • It returns a string value.

hasAdvancedSettings()

Lets you hide the advanced settings tab in the UI.

Signature

  • It returns a bool value.

isCustomTemplate()

If your template allows a user to add js/html code to the site for example, you should be overwriting this method and return true.

Signature

  • It returns a bool value.