Contentserv PHP API

EditReferencesSystemRuleAction extends CSRuleActionPlugin
in package

The definition of the system rule action plugin to set, add or remove references to the context.

Back reference attribute are currently not supported in the rule action plugin.

Tags
since

CS20.9

Table of Contents

ACTION_OPTION_ADD_REFERENCE  = 'AddReferences'
The available action options of the current plugin.
ACTION_OPTION_REMOVE_REFERENCE  = 'RemoveReferences'
ACTION_OPTION_SET_REFERENCE  = 'SetReferences'
FIELD_REFERENCE_ACTION  = 'ReferenceAction'
The used configuration field names for the current plugin.
FIELD_REFERENCE_BOX  = 'ReferenceBox'
FIELD_REFERENCE_CONFIGURATION  = 'ReferenceConfiguration'
FIELD_REFERENCE_VALUE  = 'ReferenceValue'
__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.
execute()  : mixed
This method executes the rule action.
getAction()  : CSRuleApiAction
Returns the data quality action API object.
getActionDescription()  : string
Returns the action description for the user.
getActionValue()  : mixed
Returns the value from the action for a given key.
getAlternativePluginFolder()  : array<string|int, mixed>
getConfigurationFields()  : array<string|int, CSGuiField>
Returns the defined field configurations.
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.
getMessagesForUI()  : array<string|int, mixed>
Returns the added messages for the UI.
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.
getRule()  : CSRuleApiRule
Returns the data quality rule API object.
isAvailable()  : bool
This method is called to check, whether the plugin is available.
resetLoadedPlugins()  : mixed
reset the internal plugins cache for loaded plugins
shouldBeExecutedForEachLanguage()  : bool
Defines if the action should be executed for each configured language in the rule configuration.
shouldCancelFollowingActions()  : bool
This method is called to check, whether the following actions should be canceled.

Constants

ACTION_OPTION_ADD_REFERENCE

The available action options of the current plugin.

public string ACTION_OPTION_ADD_REFERENCE = 'AddReferences'
Tags

FIELD_REFERENCE_ACTION

The used configuration field names for the current plugin.

public string FIELD_REFERENCE_ACTION = 'ReferenceAction'

SELECT_FIELD_CLASS_VALUE

Tags

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

execute()

This method executes the rule action.

public final execute(CSRuleContext $oContext[, mixed $mValueFromPreviousAction = null ][, int $iLanguageId = null ]) : mixed
Parameters
$oContext : CSRuleContext

The current rule context.

$mValueFromPreviousAction : mixed = null

The value from the previous executed rule action.

$iLanguageId : int = null

The current language id for the action.

Tags
access

public final

Return values
mixed

getActionDescription()

Returns the action description for the user.

public final getActionDescription() : string
Tags
access

public final

Return values
string

with the action description for the user.

getActionValue()

Returns the value from the action for a given key.

public getActionValue(mixed $mKey) : mixed
Parameters
$mKey : mixed

The key for the value.

Tags
Return values
mixed

action value.

getAlternativePluginFolder()

public static getAlternativePluginFolder() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>

getConfigurationFields()

Returns the defined field configurations.

public final getConfigurationFields() : array<string|int, CSGuiField>
Tags
access

public final

Return values
array<string|int, CSGuiField>

with the defined field configurations.

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

getMessagesForUI()

Returns the added messages for the UI.

public final getMessagesForUI() : array<string|int, mixed>
Tags
access

public final

Return values
array<string|int, mixed>

with the added messages for the UI.

getMetaData()

Returns the CSMetaData of the current plugin.

public getMetaData() : CSMetaData
Tags
access

public

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

getRule()

Returns the data quality rule API object.

public final getRule() : CSRuleApiRule
Tags
access

public final

Return values
CSRuleApiRule

with the data quality rule API object.

isAvailable()

This method is called to check, whether the plugin is available.

public final isAvailable([mixed $aPluginArguments = null ]) : bool
Parameters
$aPluginArguments : mixed = null
Tags
inheritdoc
Return values
bool

whether the plugin is available for the given arguments

resetLoadedPlugins()

reset the internal plugins cache for loaded plugins

public static resetLoadedPlugins() : mixed
Tags
@return

void;

access

public

Return values
mixed

shouldBeExecutedForEachLanguage()

Defines if the action should be executed for each configured language in the rule configuration.

public final shouldBeExecutedForEachLanguage() : bool
Tags
Return values
bool

if the action should be executed for each configured language in the rule configuration.

shouldCancelFollowingActions()

This method is called to check, whether the following actions should be canceled.

public final shouldCancelFollowingActions() : bool
Tags
access

public final

Return values
bool

whether the following actions should be canceled.


        

Search results