HelpTopicPluginInterface
interface HelpTopicPluginInterface implements PluginInspectionInterface, DerivativeInspectionInterface, CacheableDependencyInterface (View source)
| internal | Help Topics is currently experimental and should only be leveraged by experimental modules and development releases of contributed modules. See https://www.drupal.org/core/experimental for more information. |
Defines an interface for help topic plugin classes.
Methods
Gets the definition of the plugin implementation.
Gets the base_plugin_id of the plugin instance.
Gets the derivative_id of the plugin instance.
The cache contexts associated with this object.
The cache tags associated with this object.
The maximum age for which this object may be cached.
Returns the label of the topic.
Returns the body of the topic.
Returns whether this is a top-level topic or not.
Returns the IDs of related topics.
Details
string
getPluginId()
Gets the plugin_id of the plugin instance.
array
getPluginDefinition()
Gets the definition of the plugin implementation.
string
getBaseId()
Gets the base_plugin_id of the plugin instance.
string|null
getDerivativeId()
Gets the derivative_id of the plugin instance.
string[]
getCacheContexts()
The cache contexts associated with this object.
These identify a specific variation/representation of the object.
Cache contexts are tokens: placeholders that are converted to cache keys by the @cache_contexts_manager service. The replacement value depends on the request context (the current URL, language, and so on). They're converted before storing an object in cache.
string[]
getCacheTags()
The cache tags associated with this object.
When this object is modified, these cache tags will be invalidated.
int
getCacheMaxAge()
The maximum age for which this object may be cached.
string
getLabel()
Returns the label of the topic.
array
getBody()
Returns the body of the topic.
bool
isTopLevel()
Returns whether this is a top-level topic or not.
string[]
getRelated()
Returns the IDs of related topics.
Url
toUrl(array $options = [])
Returns the URL for viewing the help topic.
Link
toLink(string|null $text = NULL, array $options = [])
Returns a link for viewing the help topic.