CSPortalSetupPlugin
extends CSPlugin
in package
This plugins controls the CSPortal Interface It contains methods which are called during the Portal Setup To be included, it must be placed in a plugins/portal subfolder with a file name ending with PortalSetup.php.
Tags
Table of Contents
- __call() : mixed|string
- All method calls which are not defined within the plugin are forwarded to the module Therefore it is possible to get, e.g. the label by calling the getSuiteName() method.
- _construct() : void
- The construct method may be used to initialize custom plugin properties it is called immediately after instantiating the plugin all arguments passed to the getPlugins method are also available in this method.
- addAlternativePluginFolder() : void
- A path to a specific folder in which should be search for plugins.
- addFooterLinks() : array<string|int, mixed>
- Extend to add additional links in the footer of your portal
- addHeaderLinks() : array<string|int, mixed>
- Extend to add additional links in the upper right of your portal
- addRegisterFields() : CSPortalGuiForm
- Enter description here .
- afterRegister() : void
- Enter description here .
- beforeRegister() : bool
- Enter description here .
- getAlternativePluginFolder() : array<string|int, mixed>
- getFavicon() : string
- changes the default favicon
- getFooterHTML() : mixed
- Extend to output a custom footer. Will replace the default footer generated from the portal framework.
- getForgotPasswordMailTemplate() : string
- Extend to return a custom e-mail template that is used to create the e-mail sent on "forgot password" requests to your portal
- getHeaderHTML() : mixed
- Extend to output a custom header. Will replace the default header generated from the portal framework.
- getHeaderLinkUserName() : string
- Gets the displayed text from the HeaderLink username
- getInitialUsername() : void
- Enter description here .
- getLevel() : int
- The getLevel method may be overwritten in the plugins and defines the order, the plugins are called, where the highest level is called first.
- getLoginWindowCSSLinks() : array<string|int, mixed>|string
- Extend and return relative path to CSS file that enhances the looks of the login dialogue
- getLoginWindowFooterLeft() : string
- Enter description here.
- getLoginWindowFooterRight() : string
- Enter description here.
- getLoginWindowHeaderLeft() : string
- Extend and return own login heading left
- getLoginWindowHeaderRight() : string
- Extend and return own login heading right
- getLoginWindowTitle() : string
- Extend and return own login window title
- getLogoHTML() : mixed
- Extend to output a custom logo. Will replace the default logo generated from the portal framework.
- getMetaData() : CSMetaData
- Returns the CSMetaData of the current plugin.
- getModule() : CSModule
- Returns the module, if the plugin is defined within a module.
- getPlugin() : CSPlugin|null
- Returns a CSPlugin for the given plugin type and plugin class name.
- getPluginChooser() : array<string|int, mixed>
- Returns an array all defined CSPlugins for the current plugin type
- getPluginData() : mixed
- getPluginDefinitionFile() : string
- Returns the path to the file, the plugin is defined.
- getPluginName() : mixed
- getPlugins() : array<string|int, CSPlugin>
- Returns all defined CSPlugins for the current plugin type It should be used to get all matching plugins for a given plugin api.
- getPluginsInModule() : array<string|int, mixed>
- Returns all CSPlugins for the current plugin type which are defined within the given module It should be used to get all matching plugins for a given plugin api.
- getRegisterMailTemplate() : string
- Extend to return a custom e-mail template that is used to create the e-mail on registration
- getTitleHTML() : mixed
- Extend to output a custom title. Will replace the default title generated from the portal framework.
- getWidgetCSSLinks() : array<string|int, mixed>
- Extend and return relative path to CSS file that enhances the looks of your portal's Widgets
- getWindowTitle() : string
- Gets the Window Title of the Portal Window in the Browser
- guessProject() : bool
- Enter description here.
- isAvailable() : bool
- This method is called to check, whether the plugin is available.
- removeFooterLinks() : array<string|int, mixed>
- Remove existing links from the portal footer
- removeHeaderLinks() : array<string|int, mixed>
- Remove existing header links from the portal
- resetLoadedPlugins() : mixed
- reset the internal plugins cache for loaded plugins
- useDefaultLoginCss() : bool
- Enter description here.
Methods
__call()
All method calls which are not defined within the plugin are forwarded to the module Therefore it is possible to get, e.g. the label by calling the getSuiteName() method.
public
__call(mixed $methodName, mixed $methodArguments) : mixed|string
Parameters
- $methodName : mixed
- $methodArguments : mixed
Tags
Return values
mixed|string —_construct()
The construct method may be used to initialize custom plugin properties it is called immediately after instantiating the plugin all arguments passed to the getPlugins method are also available in this method.
public
_construct() : void
Tags
Return values
void —addAlternativePluginFolder()
A path to a specific folder in which should be search for plugins.
public
static addAlternativePluginFolder(mixed $sPluginFolder) : void
Parameters
- $sPluginFolder : mixed
Tags
Return values
void —addFooterLinks()
Extend to add additional links in the footer of your portal
public
addFooterLinks(CSPortalPortal $portal) : array<string|int, mixed>
Parameters
- $portal : CSPortalPortal
-
API reference to portal
Tags
Return values
array<string|int, mixed> —list of CSPortalGuiLink elements
addHeaderLinks()
Extend to add additional links in the upper right of your portal
public
addHeaderLinks(CSPortalPortal $portal) : array<string|int, mixed>
Parameters
- $portal : CSPortalPortal
-
API reference to portal
Tags
Return values
array<string|int, mixed> —list of CSPortalGuiLink elements
addRegisterFields()
Enter description here .
public
addRegisterFields(CSPortalGuiForm $form) : CSPortalGuiForm
..
Parameters
- $form : CSPortalGuiForm
Tags
Return values
CSPortalGuiForm —afterRegister()
Enter description here .
public
afterRegister(CSUser $user) : void
..
Parameters
- $user : CSUser
Tags
Return values
void —beforeRegister()
Enter description here .
public
beforeRegister(CSUser $user) : bool
..
Parameters
- $user : CSUser
Tags
Return values
bool —getAlternativePluginFolder()
public
static getAlternativePluginFolder() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getFavicon()
changes the default favicon
public
getFavicon() : string
Tags
Return values
string —the path to the favicon relative to the admin directory
getFooterHTML()
Extend to output a custom footer. Will replace the default footer generated from the portal framework.
public
getFooterHTML(string $footerHTML[, CSPortalPortal $portal = null ][, CSPortalGuiPortal $guiportal = null ]) : mixed
Parameters
- $footerHTML : string
-
the default HTML representing the footer
- $portal : CSPortalPortal = null
-
API reference to portal
- $guiportal : CSPortalGuiPortal = null
Tags
Return values
mixed —Return HTML-Output or null if no custom footer is necessary.
getForgotPasswordMailTemplate()
Extend to return a custom e-mail template that is used to create the e-mail sent on "forgot password" requests to your portal
public
getForgotPasswordMailTemplate() : string
Tags
Return values
string —getHeaderHTML()
Extend to output a custom header. Will replace the default header generated from the portal framework.
public
getHeaderHTML(string $headerHTML[, CSPortalPortal $portal = null ][, CSPortalGuiPortal $guiportal = null ]) : mixed
Parameters
- $headerHTML : string
-
the default HTML representing the header
- $portal : CSPortalPortal = null
-
API reference to portal
- $guiportal : CSPortalGuiPortal = null
Tags
Return values
mixed —Return HTML-Output or null if no custom header is necessary.
getHeaderLinkUserName()
Gets the displayed text from the HeaderLink username
public
getHeaderLinkUserName(string $sUserName) : string
Parameters
- $sUserName : string
Tags
Return values
string —getInitialUsername()
Enter description here .
public
getInitialUsername() : void
..
Tags
Return values
void —getLevel()
The getLevel method may be overwritten in the plugins and defines the order, the plugins are called, where the highest level is called first.
public
getLevel() : int
The method can also be set for all plugins within a module by overwriting the modules getLevel method.
Tags
Return values
int —the level of the plugin where it is called
getLoginWindowCSSLinks()
Extend and return relative path to CSS file that enhances the looks of the login dialogue
public
getLoginWindowCSSLinks() : array<string|int, mixed>|string
Tags
Return values
array<string|int, mixed>|string —single or multiple paths to css files
getLoginWindowFooterLeft()
Enter description here.
public
getLoginWindowFooterLeft() : string
..
Tags
Return values
string —Html-Code
getLoginWindowFooterRight()
Enter description here.
public
getLoginWindowFooterRight() : string
..
Tags
Return values
string —Html-Code
getLoginWindowHeaderLeft()
Extend and return own login heading left
public
getLoginWindowHeaderLeft() : string
Tags
Return values
string —getLoginWindowHeaderRight()
Extend and return own login heading right
public
getLoginWindowHeaderRight() : string
Tags
Return values
string —getLoginWindowTitle()
Extend and return own login window title
public
getLoginWindowTitle() : string
Tags
Return values
string —getLogoHTML()
Extend to output a custom logo. Will replace the default logo generated from the portal framework.
public
getLogoHTML(string $logoHTML[, CSPortalPortal $portal = null ][, CSPortalGuiPortal $guiportal = null ]) : mixed
Parameters
- $logoHTML : string
-
the default HTML representing the logo
- $portal : CSPortalPortal = null
-
API reference to portal
- $guiportal : CSPortalGuiPortal = null
Tags
Return values
mixed —Return HTML-Output or null if no logo title is necessary.
getMetaData()
Returns the CSMetaData of the current plugin.
public
getMetaData() : CSMetaData
Tags
Return values
CSMetaData —getModule()
Returns the module, if the plugin is defined within a module.
public
getModule() : CSModule
This method can be used in the plugin api and the plugin wherever access to the defining module is required. If it is used in the Api, it should be noticed that this method may return null, if the plugin is directly defined in the projects or admin.local plugins directory.
Tags
Return values
CSModule —the module object, if the plugin defined in a module or null otherwise
getPlugin()
Returns a CSPlugin for the given plugin type and plugin class name.
public
static getPlugin(string $pluginApiPath, string $className[, mixed $arguments = NULL ]) : CSPlugin|null
As standard behaviour the module subfolder is guessed from the forward URL parameter. If a plugin should point to something in a special module subfolder, this scope can be added by adding the module name in squared bracket at the end of the $pluginApiPath, e.g. 'core/api/plugins/CSRecordPlugin.php[pms]' to get all CSRecordPlugins defined for pms records.
Parameters
- $pluginApiPath : string
-
The relative path in filesystem for the requested plugin api (optional: ending with the module subfolder).
- $className : string
-
The target plugin class name, which should be loaded.
- $arguments : mixed = NULL
-
one or multiple arguments which should be passed to the isAvailable method.
Tags
Return values
CSPlugin|null —Returns the requested plugin for the given parameter.
getPluginChooser()
Returns an array all defined CSPlugins for the current plugin type
public
static getPluginChooser(string $pluginApiPath[, mixed $arguments = NULL ]) : array<string|int, mixed>
Parameters
- $pluginApiPath : string
-
the relative path in filesystem for the requested plugin api (optional: ending with the module subfolder).
- $arguments : mixed = NULL
-
one ore multiple arguments which should be passed to the isAvailable method.
Tags
Return values
array<string|int, mixed> —of CSPlugins in the form [CLASSNAME => LABEL] where the CLASSNAME may be used in the CSPlugin::getPlugin method
getPluginData()
public
getPluginData() : mixed
Tags
Return values
mixed —getPluginDefinitionFile()
Returns the path to the file, the plugin is defined.
public
getPluginDefinitionFile() : string
Tags
Return values
string —the path to the plugin
getPluginName()
public
getPluginName() : mixed
Tags
Return values
mixed —getPlugins()
Returns all defined CSPlugins for the current plugin type It should be used to get all matching plugins for a given plugin api.
public
static getPlugins(string $pluginApiPath[, mixed $arguments = NULL ]) : array<string|int, CSPlugin>
As standard behaviour the module subfolder is guessed from the forward URL parameter. If a plugin should point to something in a special module subfolder, this scope can be added by adding the module name in squared bracket at the end of the $pluginApiPath, e.g. 'core/api/plugins/CSRecordPlugin.php[pms]' to get all CSRecordPlugins defined for pms records.
Parameters
- $pluginApiPath : string
-
the relative path in filesystem for the requested plugin api (optional: ending with the module subfolder).
- $arguments : mixed = NULL
-
one ore multiple arguments which should be passed to the isAvailable method.
Tags
Return values
array<string|int, CSPlugin> —array of CSPlugin objects matching the defined plugin criteria
getPluginsInModule()
Returns all CSPlugins for the current plugin type which are defined within the given module It should be used to get all matching plugins for a given plugin api.
public
static getPluginsInModule(string $moduleName, string $pluginApiPath[, mixed $sFileNamePattern = '' ][, mixed $arguments = NULL ]) : array<string|int, mixed>
Parameters
- $moduleName : string
-
the module which should be searched for plugins
- $pluginApiPath : string
-
the relative path in filesystem for the requested plugin api.
- $sFileNamePattern : mixed = ''
- $arguments : mixed = NULL
-
one ore multiple arguments which should be passed to the isAvailable method.
Tags
Return values
array<string|int, mixed> —of CSPlugin objects matching the defined plugin criterias
getRegisterMailTemplate()
Extend to return a custom e-mail template that is used to create the e-mail on registration
public
getRegisterMailTemplate() : string
Tags
Return values
string —getTitleHTML()
Extend to output a custom title. Will replace the default title generated from the portal framework.
public
getTitleHTML(string $titleHTML[, CSPortalPortal $portal = null ][, CSPortalGuiPortal $guiportal = null ]) : mixed
Parameters
- $titleHTML : string
-
the default HTML representing the title
- $portal : CSPortalPortal = null
-
API reference to portal
- $guiportal : CSPortalGuiPortal = null
Tags
Return values
mixed —Return HTML-Output or null if no custom title is necessary.
getWidgetCSSLinks()
Extend and return relative path to CSS file that enhances the looks of your portal's Widgets
public
getWidgetCSSLinks() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getWindowTitle()
Gets the Window Title of the Portal Window in the Browser
public
getWindowTitle(string $sDefaultTitle) : string
Parameters
- $sDefaultTitle : string
-
Is the default window title
Tags
Return values
string —guessProject()
Enter description here.
public
guessProject() : bool
..
Tags
Return values
bool —isAvailable()
This method is called to check, whether the plugin is available.
public
isAvailable() : bool
If further arguments are added to the CSPlugin::getPlugins call, they are added as arguments to this method.
For simpler usage of the plugin concept: This method should be overwritten with the correct signature for a plugin call, if arguments are passed.
Tags
Return values
bool —whether the plugin is available for the given arguments
removeFooterLinks()
Remove existing links from the portal footer
public
removeFooterLinks(CSPortalPortal $oPortal) : array<string|int, mixed>
Parameters
- $oPortal : CSPortalPortal
-
API reference to portal
Tags
Return values
array<string|int, mixed> —list of remaining CSPortalGuiLink elements
removeHeaderLinks()
Remove existing header links from the portal
public
removeHeaderLinks(CSPortalPortal $oPortal) : array<string|int, mixed>
Parameters
- $oPortal : CSPortalPortal
-
API reference to portal
Tags
Return values
array<string|int, mixed> —list of remaining CSPortalGuiLink elements
resetLoadedPlugins()
reset the internal plugins cache for loaded plugins
public
static resetLoadedPlugins() : mixed
Tags
Return values
mixed —useDefaultLoginCss()
Enter description here.
public
useDefaultLoginCss() : bool
..
