The CMS will set these variables on your plugin before calling your init() and showSlot() methods. They give you information about where plugin is currently running from.
You can use syntax of the form:
$this->variableName
to access these variables from your PHP code.
The id of the current content item.
The HTML/DOM id of the div
element that your Plugin has been placed in.
The type of the current content item, e.g. document
, html
, picture
...
When an admin or a visitor is looking at a content item, this contains the version of a content item which is currently in view.
In visitor mode this will always be equal to the cms_core::$visitorVersion variable.
The nested id of your Plugin, if your Plugin is placed in a Nest.
The id of the currently running instance of your Plugin, from the plugin_instances
table.
The name of the currently running instance of your Plugin, from the plugin_instances
table.
This environment variable will be true for version controlled plugins, and false for library plugins.
The class name of the currently running Module.
This stores the VLP classname used for phrases in your Plugin.
The id of the currently running Module, from the modules
table.
This enivornment variable will be set to 1, 2 or 3 depending on the scope that your Plugin is currently running at. Template Familiy level is 3, Template Level is 2, and Content Item level is 1.
The name of the Slot that your Plugin is running from.
If this Plugin is part of a tabbed Plugin Nest, $this->tabId will store the Tab's id in the nested_plugins table.
If this Plugin is not part of a Nest, or the Plugin is part of a Nest but no tabs have been set up, $this->tabId will be 0.