CSItemSearchAreaPlugin
extends CSOpenSearchAreaPlugin
in package
implements
IOpenSearchDownloadable
Plugin for item search areas
Tags
Interfaces, Classes and Traits
- IOpenSearchDownloadable
- This interface defines a downloadable item for open search.
Table of Contents
- CLASS_OPERATOR_HAS_CLASS = 1
- CLASS_OPERATOR_IS_CONTAINING_CLASS = 0
- The class operators available for class comparison
- CLASS_OPERATOR_IS_MAIN_CLASS = 2
- DESCRIPTION_MAX_CHARACTER_LIMIT = 200
- DESCRIPTION_MAX_CHARACTER_LIMIT_FOR_REFERENCE = 80
- TAG_OPERATOR_HAS_TAG = 1
- TAG_OPERATOR_IS_CONTAINING_TAG = 0
- The tag operators available for tag comparison
- $aItemFormattedValues : array<string|int, mixed>
- __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.
- addActionFieldsToEditor() : void
- This method adds the action fields into the editor like view, edit and download.
- addAlternativePluginFolder() : void
- A path to a specific folder in which should be search for plugins.
- addFormDefinitionForDownloadMassAction() : mixed
- Adds form fields in Open Search Download dialog
- addItems() : void
- Adds the Items to the Response objects
- addPreviewFieldToEditor() : void
- Add Preview Attribute field
- addSelectModeItems() : void
- Adds Items to the response object
- canExportAdditionalReferences() : bool
- Tells whether the search area plugin supports additional references
- deleteItems() : array<string|int, mixed>
- This method delete search area mapping in specified collection for specified record ids and class id.
- executeMassActionForMailSend() : CSOpenSearchFormResponse|mixed
- Executes Send E-Mail mass action.
- executeMassActionForType() : CSOpenSearchFormResponse|null
- This method is called if any mass action was executed on the client.
- exportForContext() : CSDownloadResult
- Executes the export for the specified download context.
- getAdditionalAssets() : CSDownloadResult
- Returns object with additional assets to export with the exported file
- getAdditionalItemCSSClass() : string
- Returns an additional CSS class for search items
- getAlternativePluginFolder() : array<string|int, mixed>
- getCacheFolderForArea() : string
- Returns the internal cache folder for a given area.
- getContentID() : int
- If the search result corresponds to a file this method can be overwritten to connect the search result to a MAM File.
- getCSSLink() : string
- The Plugins may return here an relative or absolute link to a CSS file if they wish This link will be added to the Search GUI. Use CS::getLinkToResource(url, format) with the format param absolute or relative to generate a link that can be used within any REST url
- getDefaultInfoAttributes() : array<string|int, string>
- This method asks for the default info attributes
- getDefaultPreviewAttributes() : string
- Return global selection attributes of Preview Images.
- getDefaultTeaserTitleText() : string
- This method return default text for the teaser title attribute.
- getDownloadFormats() : array<string|int, mixed>
- Fetches the possible download formats
- getEmailComponent() : CSOpenSearchEmailComponent|null
- Returns a CSOpenSearchEmailComponent object.
- getEmptySearchResultIDs() : array<string|int, int>
- This method can be overwritten if an search area should have default search results on empty searches
- getExportFileForDownload() : string
- Method will create file for item provided with preset
- getFallbackSortOrder() : string
- Returns the fallback sort order field.
- getFieldValue() : string
- Gets the stores field values of the area.
- getFormDefinitionForMassActionByType() : CSOpenSearchForm
- Returns a form definition (CSOpenSearchForm object) for the given mass action type.
- getHashForArea() : bool|string
- Returns an unique hash for an area.
- getInitialVewModeForShareWindow() : string
- Returns the initial view mode for the whole window.
- getItem() : CSItemApiItem
- getItemClassName() : string
- Give a class name of the item like "Pdmarticle"
- getItemSearchFilter() : CSItemSearchFilter
- Returns ItemSearchFilter for searching in OpenSearch
- 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.
- getLink() : string
- getLinkIcons() : array<string|int, mixed>
- Tells the framework which link icons should be used for the mapped link names.
- getLinkNames() : array<string|int, mixed>
- Tells the framework which link names are supported
- getMassDownloadSectionName() : string
- Fetches the section name for the Mass Download Dialog for current item type
- getMaxPreviewsForPreviewView() : int
- Returns the maximal previews available for the preview view.
- getMaxPreviewsForTeaserView() : int
- Returns the maximal previews available for the list view.
- getMetaData() : CSMetaData
- Returns the CSMetaData of the current plugin.
- getModule() : CSModule
- Returns the module, if the plugin is defined within a module.
- getObjectTypeIds() : string
- Returns the configured root data object type ids of the search area
- getPaneSortOrder() : int
- Returns the default sort oder for the area panes.
- 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.
- getPreviewHtml() : string
- Allows the Plugin to provide some html that should be displayed as preview of an item
- getPreviewInfoAttributes() : array<string|int, string>
- This method asks for the info attributes visible in the preview area
- getPreviewSubTitle() : string
- This method asks for the title subtitle value visible in the preview
- getPreviewText() : string
- This method asks for the text value visible in the preview rectangle
- getPreviewTitle() : string
- This method asks for the title value visible in the preview rectangle
- getPreviewView() : array<string|int, mixed>
- Returns a view object.
- getReferenceItemList() : array<string|int, mixed>
- This method returns the reference item list for the given items.
- getRootIds() : string
- Returns the configured root IDs of the search area
- getSearchArea() : CSOpenSearchArea
- Returns the search area.
- getSearchResultPlugins() : array<string|int, CSItemSearchResultPlugin>
- Collects all available Search Result Plugins
- getSelectedItemDownloadFormats() : array<string|int, mixed>
- Fetches the selected download formats for the share If nothing is selected, all eligible formats are available
- getSelectedReferenceItemList() : array<string|int, mixed>
- This method returns the reference item list for the given items.
- getStateIds() : string
- Returns the configured root data state ID of the search area
- getSupportedMassActionTypes() : array<string|int, string>
- Returns an array with supported custom mass actions
- getTagIds() : string
- Returns the configured root data tag ids of the search area
- getTeaserInfoAttributes() : array<string|int, mixed>
- This method asks for the info attributes visible in the teaser results
- getTeaserSubTitle() : string
- This method asks for the title subtitle value visible in the teaser results
- getTeaserText() : string
- This method asks for the text value visible in the teaser results
- getTeaserTitle() : string
- This method asks for the title value visible in the teaser results
- getViewLink() : string
- A link that should be used to view open search results
- isAvailable() : bool
- The plugin is available only when gives record type and plugin type is of same type
- isAvailableForSearchAreaType() : mixed
- isDownloadMassActionAvailable() : string
- Tells if the Mass Action for "Download" is available.
- isDownloadMassActionAvailableByViewType() : bool
- Whenever the mass download action is available for a view type
- isEmailComponentAvailableByViewType() : bool
- Returns a flag if EMail component is available or not.
- isEmailComponentEnabled() : bool
- Tells if the available EMail component is currently on the Search Area enabled or not.
- isPreviewFieldAvailable() : bool
- Preview Images field Available
- isShowFolderEnabled() : mixed
- mayDeleteItemsFromShare() : bool
- This method can be overwritten by the plugin to enable the functionality to delete the item from the share
- prepareEditor() : void
- This method can be overwritten by the plugin to add fields to the area editor
- prepareWindow() : void
- This method can be overwritten by the plugin to add fields to the area window
- renderPreviewView() : string
- Renders the given View object with default 'preview.phtml' file.
- resetLoadedPlugins() : mixed
- reset the internal plugins cache for loaded plugins
- resolveConfigurationName() : string
- Modifies the field name if required
- resolvePluginForRecord() : CSPlugin
- Resolves plugin for the given record.
- search() : void
- This is the most important method to implement when defining your CSOpenSearch.
- setFieldValue() : void
- sets the field values of the area.
- setSearchArea() : void
- Sets the search area
- supportsFullTextSearch() : bool
- Tells whether the search area plugin supports full text search
- updateDownloadManagerWithDownloadDetails() : mixed
- Updates Download Manager with the request to download items with compatible presets available from the provided list of presets.
Constants
CLASS_OPERATOR_HAS_CLASS
public
mixed
CLASS_OPERATOR_HAS_CLASS
= 1
Tags
CLASS_OPERATOR_IS_CONTAINING_CLASS
The class operators available for class comparison
public
int
CLASS_OPERATOR_IS_CONTAINING_CLASS
= 0
Tags
CLASS_OPERATOR_IS_MAIN_CLASS
public
mixed
CLASS_OPERATOR_IS_MAIN_CLASS
= 2
Tags
DESCRIPTION_MAX_CHARACTER_LIMIT
public
mixed
DESCRIPTION_MAX_CHARACTER_LIMIT
= 200
Tags
DESCRIPTION_MAX_CHARACTER_LIMIT_FOR_REFERENCE
public
mixed
DESCRIPTION_MAX_CHARACTER_LIMIT_FOR_REFERENCE
= 80
Tags
TAG_OPERATOR_HAS_TAG
public
mixed
TAG_OPERATOR_HAS_TAG
= 1
Tags
TAG_OPERATOR_IS_CONTAINING_TAG
The tag operators available for tag comparison
public
int
TAG_OPERATOR_IS_CONTAINING_TAG
= 0
Tags
Properties
$aItemFormattedValues
public
array<string|int, mixed>
$aItemFormattedValues
= array()
Storing formatted values
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 —addActionFieldsToEditor()
This method adds the action fields into the editor like view, edit and download.
public
addActionFieldsToEditor(mixed $oEditor) : void
Parameters
- $oEditor : mixed
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 —addFormDefinitionForDownloadMassAction()
Adds form fields in Open Search Download dialog
public
addFormDefinitionForDownloadMassAction(CSOpenSearchFormSection $oOpenSearchFormSection, array<string|int, mixed> $aItemIds) : mixed
Parameters
- $oOpenSearchFormSection : CSOpenSearchFormSection
-
The section from Open Search Download dialog
- $aItemIds : array<string|int, mixed>
-
The list of all items ids
Tags
Return values
mixed —addItems()
Adds the Items to the Response objects
public
addItems(CSOpenSearchRequest $oRequest, CSOpenSearchResponse $oResponse[, array<string|int, mixed> $aIDs = array() ]) : void
Parameters
- $oRequest : CSOpenSearchRequest
-
the request object.
- $oResponse : CSOpenSearchResponse
-
the response object.
- $aIDs : array<string|int, mixed> = array()
-
are the eligible ids which gets added into response object.
Tags
Return values
void —addPreviewFieldToEditor()
Add Preview Attribute field
public
addPreviewFieldToEditor(string $sFieldName, string $sPaneName, Itemconfiguration $oConfiguration, CSGuiEditor $oEditor) : void
Parameters
- $sFieldName : string
-
Field Name
- $sPaneName : string
-
Pane Title
- $oConfiguration : Itemconfiguration
-
Configuration Object
- $oEditor : CSGuiEditor
-
Editor Object
Tags
Return values
void —addSelectModeItems()
Adds Items to the response object
public
addSelectModeItems(CSOpenSearchRequest $oRequest, CSOpenSearchResponse $oResponse) : void
Parameters
- $oRequest : CSOpenSearchRequest
- $oResponse : CSOpenSearchResponse
Tags
Return values
void —canExportAdditionalReferences()
Tells whether the search area plugin supports additional references
public
canExportAdditionalReferences() : bool
Tags
Return values
bool —deleteItems()
This method delete search area mapping in specified collection for specified record ids and class id.
public
deleteItems(array<string|int, mixed> $aItemList) : array<string|int, mixed>
Parameters
- $aItemList : array<string|int, mixed>
-
Array of item ids with class id for which mapping has to be deleted from collection.
Tags
Return values
array<string|int, mixed> —Array of item ids with class id for which mapping has been deleted from collection.
executeMassActionForMailSend()
Executes Send E-Mail mass action.
public
executeMassActionForMailSend(CSOpenSearchRequest $oRequest, array<string|int, CSOpenSearchFormFieldRequest> $aoFormFields) : CSOpenSearchFormResponse|mixed
Parameters
- $oRequest : CSOpenSearchRequest
- $aoFormFields : array<string|int, CSOpenSearchFormFieldRequest>
Tags
Return values
CSOpenSearchFormResponse|mixed —executeMassActionForType()
This method is called if any mass action was executed on the client.
public
executeMassActionForType(string $sAction, CSOpenSearchRequest $oRequest, CSOpenSearchResponse $oResponse, array<string|int, CSOpenSearchFormFieldRequest> $aValues) : CSOpenSearchFormResponse|null
Parameters
- $sAction : string
- $oRequest : CSOpenSearchRequest
- $oResponse : CSOpenSearchResponse
- $aValues : array<string|int, CSOpenSearchFormFieldRequest>
Tags
Return values
CSOpenSearchFormResponse|null —exportForContext()
Executes the export for the specified download context.
public
exportForContext(CSOpenSearchDownloadContext $oContext) : CSDownloadResult
Parameters
- $oContext : CSOpenSearchDownloadContext
-
The download context.
Tags
Return values
CSDownloadResult —The download result containing information about files to download.
getAdditionalAssets()
Returns object with additional assets to export with the exported file
public
getAdditionalAssets() : CSDownloadResult
Tags
Return values
CSDownloadResult —Object with additional assets
getAdditionalItemCSSClass()
Returns an additional CSS class for search items
public
getAdditionalItemCSSClass() : string
Tags
Return values
string —The additional CSS Class an Item shall get
getAlternativePluginFolder()
public
static getAlternativePluginFolder() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getCacheFolderForArea()
Returns the internal cache folder for a given area.
public
getCacheFolderForArea(CSOpenSearchArea $oOpenSearch) : string
Parameters
- $oOpenSearch : CSOpenSearchArea
Tags
Return values
string —getContentID()
If the search result corresponds to a file this method can be overwritten to connect the search result to a MAM File.
public
getContentID(CSItemApiItem $object) : int
Parameters
- $object : CSItemApiItem
-
the item
Tags
Return values
int —$MamFileID the ID of a mam file to be associated with the search result
getCSSLink()
The Plugins may return here an relative or absolute link to a CSS file if they wish This link will be added to the Search GUI. Use CS::getLinkToResource(url, format) with the format param absolute or relative to generate a link that can be used within any REST url
public
getCSSLink() : string
Tags
Return values
string —the link with an absolute or relative url
getDefaultInfoAttributes()
This method asks for the default info attributes
public
getDefaultInfoAttributes(CSItemApiItem $oItem, int $iLangId[, bool $detailed = false ]) : array<string|int, string>
Parameters
- $oItem : CSItemApiItem
-
the item
- $iLangId : int
-
the LanguageID of the info values
- $detailed : bool = false
-
TRUE for more info
Tags
Return values
array<string|int, string> —array with the info attribute values
getDefaultPreviewAttributes()
Return global selection attributes of Preview Images.
public
getDefaultPreviewAttributes() : string
Tags
Return values
string —getDefaultTeaserTitleText()
This method return default text for the teaser title attribute.
public
getDefaultTeaserTitleText(CSItemApiItem $oItem, int $iLangId) : string
Parameters
- $oItem : CSItemApiItem
-
the item object for which default teaser title is requested.
- $iLangId : int
-
the language id.
Tags
Return values
string —is the teaser text.
getDownloadFormats()
Fetches the possible download formats
public
getDownloadFormats() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —List of possible download formats
getEmailComponent()
Returns a CSOpenSearchEmailComponent object.
public
getEmailComponent() : CSOpenSearchEmailComponent|null
This Component is a virtual object for E-Mail fields. The Component does not store any information back to the Area
Tags
Return values
CSOpenSearchEmailComponent|null —getEmptySearchResultIDs()
This method can be overwritten if an search area should have default search results on empty searches
public
getEmptySearchResultIDs(CSItemApiItem $oRootItem, array<string|int, mixed> $aRootIds, CSItemSearchFilter $oFilter, int $iCacheMinutes) : array<string|int, int>
Parameters
- $oRootItem : CSItemApiItem
-
the item which has the right language set
- $aRootIds : array<string|int, mixed>
-
array or integer with the root items
- $oFilter : CSItemSearchFilter
-
the predefined search filter
- $iCacheMinutes : int
-
the minutes for caching
Tags
Return values
array<string|int, int> —array of Result IDs
getExportFileForDownload()
Method will create file for item provided with preset
public
getExportFileForDownload(array<string|int, mixed> $aItemIds, int $iPresetId, mixed $sPresetClass, int $iLanguageId[, string $sFolderPath = null ]) : string
Parameters
- $aItemIds : array<string|int, mixed>
-
The item ids for which file will be created
- $iPresetId : int
-
The MAM preset ID for which file will be created
- $sPresetClass : mixed
- $iLanguageId : int
-
The file will be created for passed language
- $sFolderPath : string = null
-
The path of folder where the export file should be placed. NOTE: This parameter is deprecated and will be removed in future releases. Its usage is highly discouraged.
Tags
Return values
string —path to file which is created
getFallbackSortOrder()
Returns the fallback sort order field.
public
getFallbackSortOrder() : string
Note: The fallback sort order is used only for MySQL based searches. i.e. when Elastic Search is not available.
Tags
Return values
string —with the fallback sort order field.
getFieldValue()
Gets the stores field values of the area.
public
getFieldValue(mixed $sFieldName) : string
Parameters
- $sFieldName : mixed
Tags
Return values
string —getFormDefinitionForMassActionByType()
Returns a form definition (CSOpenSearchForm object) for the given mass action type.
public
getFormDefinitionForMassActionByType(mixed $sMassActionType, mixed $oRequest) : CSOpenSearchForm
This method is only called if the mass action type is defined in
Parameters
- $sMassActionType : mixed
- $oRequest : mixed
Tags
Return values
CSOpenSearchForm —getHashForArea()
Returns an unique hash for an area.
public
getHashForArea(CSOpenSearchArea $oOpenSearch) : bool|string
Parameters
- $oOpenSearch : CSOpenSearchArea
Tags
Return values
bool|string —getInitialVewModeForShareWindow()
Returns the initial view mode for the whole window.
public
getInitialVewModeForShareWindow(CSOpenSearchRequest $oRequest) : string
At the moment only OpenShare Window consider this method.
Parameters
- $oRequest : CSOpenSearchRequest
Tags
Return values
string —On of the supported view modes CSOpenSearchWindow::VIEW_MODE_*
getItem()
public
getItem([int $iItemId = null ]) : CSItemApiItem
Parameters
- $iItemId : int = null
Tags
Return values
CSItemApiItem —the item for this plugin
getItemClassName()
Give a class name of the item like "Pdmarticle"
public
getItemClassName() : string
Tags
Return values
string —the class name
getItemSearchFilter()
Returns ItemSearchFilter for searching in OpenSearch
public
getItemSearchFilter([CSOpenSearchRequest $oRequest = null ]) : CSItemSearchFilter
Parameters
- $oRequest : CSOpenSearchRequest = null
Tags
Return values
CSItemSearchFilter —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
getLink()
public
getLink(mixed $sLinkName, mixed $sLinkLabel, mixed $oObject, CSOpenSearchRequest $oRequest, mixed $iLangId) : string
Parameters
- $sLinkName : mixed
- $sLinkLabel : mixed
- $oObject : mixed
- $oRequest : CSOpenSearchRequest
- $iLangId : mixed
Tags
Return values
string —getLinkIcons()
Tells the framework which link icons should be used for the mapped link names.
public
getLinkIcons() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —with link name as key and the icon name, path or URL.
getLinkNames()
Tells the framework which link names are supported
public
getLinkNames([int $iLangId = null ]) : array<string|int, mixed>
For each Link name automatically a right is added to the area editor
Parameters
- $iLangId : int = null
-
the LanguageID or null for UI Language
Tags
Return values
array<string|int, mixed> —with link name as key and link label as value
getMassDownloadSectionName()
Fetches the section name for the Mass Download Dialog for current item type
public
getMassDownloadSectionName() : string
Tags
Return values
string —the translated record name as the section name for the download dialog
getMaxPreviewsForPreviewView()
Returns the maximal previews available for the preview view.
public
getMaxPreviewsForPreviewView() : int
This setting defines how much previews images should be visible in the 'Preview' of Opensearch.
-1: unlimited
Tags
Return values
int —getMaxPreviewsForTeaserView()
Returns the maximal previews available for the list view.
public
getMaxPreviewsForTeaserView() : int
This setting defines how much previews images should be visible in the 'Teaser' (list) of Opensearch.
Tags
Return values
int —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
getObjectTypeIds()
Returns the configured root data object type ids of the search area
public
getObjectTypeIds() : string
Tags
Return values
string —A comma separated string of object type ids
getPaneSortOrder()
Returns the default sort oder for the area panes.
public
getPaneSortOrder() : int
Overwrite this method to manipulate the sorting.
Tags
Return values
int —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
getPreviewHtml()
Allows the Plugin to provide some html that should be displayed as preview of an item
public
getPreviewHtml(mixed $iId, mixed $oRequest) : string
Parameters
- $iId : mixed
-
int ID that was provided with the addItem Method in the @see search method
- $oRequest : mixed
-
CSOpenSearchRequest that triggered the preview request.
Tags
Return values
string —html code that can be embedded via Ajax call in the search window
getPreviewInfoAttributes()
This method asks for the info attributes visible in the preview area
public
getPreviewInfoAttributes(CSItemApiItem $item, int $iLangId) : array<string|int, string>
Parameters
- $item : CSItemApiItem
-
the item
- $iLangId : int
-
the LanguageID of the info values
Tags
Return values
array<string|int, string> —array with the info attribute values
getPreviewSubTitle()
This method asks for the title subtitle value visible in the preview
public
getPreviewSubTitle(CSItemApiItem $item, int $iLangId[, string $configAttributeID = 'PreviewSubTitleID' ]) : string
Parameters
- $item : CSItemApiItem
-
The item
- $iLangId : int
-
The LanguageID of the title
- $configAttributeID : string = 'PreviewSubTitleID'
-
Internal optional parameter used for another method sharing this logic
Tags
Return values
string —the preview subtitle
getPreviewText()
This method asks for the text value visible in the preview rectangle
public
getPreviewText(CSItemApiItem $item, int $iLangId) : string
Parameters
- $item : CSItemApiItem
-
the item
- $iLangId : int
-
the LanguageID of the text
Tags
Return values
string —the preview text
getPreviewTitle()
This method asks for the title value visible in the preview rectangle
public
getPreviewTitle(CSItemApiItem $item, int $iLangId) : string
Parameters
- $item : CSItemApiItem
-
the item
- $iLangId : int
-
the LanguageID of the title
Tags
Return values
string —the preview title
getPreviewView()
Returns a view object.
public
getPreviewView(CSOpenSearchRequest $oRequest, int $iId) : array<string|int, mixed>
Parameters
- $oRequest : CSOpenSearchRequest
- $iId : int
Tags
Return values
array<string|int, mixed> —preview data
getReferenceItemList()
This method returns the reference item list for the given items.
public
getReferenceItemList(string $sItemClass, int $iItemID[, int|null $iLanguageID = null ]) : array<string|int, mixed>
Parameters
- $sItemClass : string
-
the item class name like "Pdmarticle"
- $iItemID : int
-
the item ID.
- $iLanguageID : int|null = null
-
the language ID
Tags
Return values
array<string|int, mixed> —contain reference list data.
getRootIds()
Returns the configured root IDs of the search area
public
getRootIds() : string
Tags
Return values
string —A comma separated string of IDs
getSearchArea()
Returns the search area.
public
getSearchArea() : CSOpenSearchArea
Tags
Return values
CSOpenSearchArea —The search area.
getSearchResultPlugins()
Collects all available Search Result Plugins
public
static getSearchResultPlugins() : array<string|int, CSItemSearchResultPlugin>
Tags
Return values
array<string|int, CSItemSearchResultPlugin> —The plugins
getSelectedItemDownloadFormats()
Fetches the selected download formats for the share If nothing is selected, all eligible formats are available
public
getSelectedItemDownloadFormats() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —List of selected image download formats for the images
getSelectedReferenceItemList()
This method returns the reference item list for the given items.
public
getSelectedReferenceItemList(mixed $oItemReference, mixed $iAttributeID, int $iLanguageID) : array<string|int, mixed>
Parameters
- $oItemReference : mixed
- $iAttributeID : mixed
- $iLanguageID : int
-
the language ID
Tags
Return values
array<string|int, mixed> —contain reference list data.
getStateIds()
Returns the configured root data state ID of the search area
public
getStateIds() : string
Tags
Return values
string —A comma separated string of Workflow State IDs
getSupportedMassActionTypes()
Returns an array with supported custom mass actions
public
getSupportedMassActionTypes() : array<string|int, string>
Tags
Return values
array<string|int, string> —An array with all supported custom actions.
getTagIds()
Returns the configured root data tag ids of the search area
public
getTagIds() : string
Tags
Return values
string —A comma separated string of tag ids
getTeaserInfoAttributes()
This method asks for the info attributes visible in the teaser results
public
getTeaserInfoAttributes(CSItemApiItem $oItem, int $iLangId[, string $sConfigAttrId = 'TeaserInfoIDs' ]) : array<string|int, mixed>
Parameters
- $oItem : CSItemApiItem
-
the item
- $iLangId : int
-
the LanguageID of the info values
- $sConfigAttrId : string = 'TeaserInfoIDs'
-
internal optional parameter used for another method sharing this logic
Tags
Return values
array<string|int, mixed> —an array with the info attribute values
getTeaserSubTitle()
This method asks for the title subtitle value visible in the teaser results
public
getTeaserSubTitle(CSItemApiItem $oItem, int $iLangId[, string $sConfigAttributeKey = 'TeaserSubTitleID' ]) : string
Parameters
- $oItem : CSItemApiItem
-
the item
- $iLangId : int
-
the LanguageID of the title
- $sConfigAttributeKey : string = 'TeaserSubTitleID'
-
internal optional parameter used for another method sharing this logic
Tags
Return values
string —the teaser subtitle
getTeaserText()
This method asks for the text value visible in the teaser results
public
getTeaserText(CSItemApiItem $item, int $iLangId[, string $configAttributeID = 'TeaserTextID' ]) : string
Parameters
- $item : CSItemApiItem
-
The item
- $iLangId : int
-
The LanguageID of the text
- $configAttributeID : string = 'TeaserTextID'
-
Internal optional parameter used for another method sharing this logic
Tags
Return values
string —the teaser text
getTeaserTitle()
This method asks for the title value visible in the teaser results
public
getTeaserTitle(CSItemApiItem $oItem, int $iLangId[, string $configAttributeID = 'TeaserTitleID' ]) : string
Parameters
- $oItem : CSItemApiItem
-
the item
- $iLangId : int
-
the LanguageID of the title
- $configAttributeID : string = 'TeaserTitleID'
-
internal optional parameter used for another method sharing this logic
Tags
Return values
string —the teaser title
getViewLink()
A link that should be used to view open search results
public
getViewLink(CSItemApiItem $object, int $iLangId) : string
Parameters
- $object : CSItemApiItem
-
the Item
- $iLangId : int
-
the LanguageID
Tags
Return values
string —the URL to open onClick
isAvailable()
The plugin is available only when gives record type and plugin type is of same type
public
isAvailable([null $oRecord = null ]) : bool
Parameters
- $oRecord : null = null
-
the record object like "Pdmarticle"
Tags
Return values
bool —returns true if plugin available.
isAvailableForSearchAreaType()
public
final isAvailableForSearchAreaType([mixed $iSearchAreaType = CSOpenSearchArea::TYPE_OPEN_SEARCH_AREA ]) : mixed
Parameters
- $iSearchAreaType : mixed = CSOpenSearchArea::TYPE_OPEN_SEARCH_AREA
Tags
Return values
mixed —isDownloadMassActionAvailable()
Tells if the Mass Action for "Download" is available.
public
isDownloadMassActionAvailable() : string
Tags
Return values
string —isDownloadMassActionAvailableByViewType()
Whenever the mass download action is available for a view type
public
isDownloadMassActionAvailableByViewType([int $iViewType = CSOpenSearchArea::VIEW_TYPE_ALWAYS ]) : bool
Parameters
- $iViewType : int = CSOpenSearchArea::VIEW_TYPE_ALWAYS
-
One of the CSOpenSearchArea::VIEW_TYPE_* constants
Tags
Return values
bool —isEmailComponentAvailableByViewType()
Returns a flag if EMail component is available or not.
public
isEmailComponentAvailableByViewType([int $iViewType = CSOpenSearchArea::VIEW_TYPE_ALWAYS ]) : bool
At the moment EMal Component is not available for all Item Plugins.
Parameters
- $iViewType : int = CSOpenSearchArea::VIEW_TYPE_ALWAYS
-
One of the following View Types CSOpenSearchArea::VIEW_TYPE_*
Tags
Return values
bool —isEmailComponentEnabled()
Tells if the available EMail component is currently on the Search Area enabled or not.
public
isEmailComponentEnabled() : bool
Tags
Return values
bool —isPreviewFieldAvailable()
Preview Images field Available
public
isPreviewFieldAvailable() : bool
- @return bool
Tags
Return values
bool —isShowFolderEnabled()
public
isShowFolderEnabled() : mixed
Tags
Return values
mixed —mayDeleteItemsFromShare()
This method can be overwritten by the plugin to enable the functionality to delete the item from the share
public
mayDeleteItemsFromShare() : bool
To enable this functionality, the overwritten method must return boolean TRUE.
Tags
Return values
bool —TRUE if the items from the share can be deleted by the User FALSE, otherwise
prepareEditor()
This method can be overwritten by the plugin to add fields to the area editor
public
prepareEditor(CSGuiEditor $oEditor) : void
Parameters
- $oEditor : CSGuiEditor
Tags
Return values
void —prepareWindow()
This method can be overwritten by the plugin to add fields to the area window
public
prepareWindow(CSOpenSearchWindow $oWindow) : void
Parameters
- $oWindow : CSOpenSearchWindow
-
The Open Search window object
Tags
Return values
void —renderPreviewView()
Renders the given View object with default 'preview.phtml' file.
public
renderPreviewView(CSView $oView) : string
Parameters
- $oView : CSView
Tags
Return values
string —resetLoadedPlugins()
reset the internal plugins cache for loaded plugins
public
static resetLoadedPlugins() : mixed
Tags
Return values
mixed —resolveConfigurationName()
Modifies the field name if required
public
resolveConfigurationName(mixed $sName) : string
Parameters
- $sName : mixed
-
string field name
Tags
Return values
string —field name
resolvePluginForRecord()
Resolves plugin for the given record.
public
resolvePluginForRecord(Record $oRecord) : CSPlugin
Parameters
- $oRecord : Record
-
is the record object.
Tags
Return values
CSPlugin —available plugin for the given record.
search()
This is the most important method to implement when defining your CSOpenSearch.
public
search(CSOpenSearchRequest $oRequest, CSOpenSearchResponse $oResponse) : void
Here the search results are expected to be added to the response object.
Parameters
- $oRequest : CSOpenSearchRequest
-
The search request.
- $oResponse : CSOpenSearchResponse
-
The search result.
Tags
Return values
void —setFieldValue()
sets the field values of the area.
public
setFieldValue(string $sFieldName, string $sFieldValue) : void
Parameters
- $sFieldName : string
-
Field Name
- $sFieldValue : string
-
Field Value
Tags
Return values
void —setSearchArea()
Sets the search area
public
setSearchArea(CSOpenSearchArea $oSearchArea) : void
Parameters
- $oSearchArea : CSOpenSearchArea
-
the area
Tags
Return values
void —supportsFullTextSearch()
Tells whether the search area plugin supports full text search
public
supportsFullTextSearch() : bool
Tags
Return values
bool —updateDownloadManagerWithDownloadDetails()
Updates Download Manager with the request to download items with compatible presets available from the provided list of presets.
public
updateDownloadManagerWithDownloadDetails(CSOpenSearchDownloadManager $oDownloadManager, array<string|int, mixed> $aItemIds, array<string|int, mixed> $aDownloadPresetIds) : mixed
Parameters
- $oDownloadManager : CSOpenSearchDownloadManager
-
Instance of opensearch download manager
- $aItemIds : array<string|int, mixed>
-
List of IDs of item
- $aDownloadPresetIds : array<string|int, mixed>
-
List of all the download presets available
