Interface InlineEditContext
- All Superinterfaces:
BaseContext
,SpecialistsBroker
Those items will be requested in various contexts, like a basic IDProvider
or one of its nested editors.
You may use the provided contextual information to include or exclude certain contexts in your implementation.
- Since:
- 5.0.103
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.espirit.firstspirit.access.BaseContext
BaseContext.Env
-
Method Summary
Modifier and TypeMethodDescription@Nullable EditorNode
Provides the editor node identifying the nested content in which the inline editing items have been requested, ornull
if this context only references a top level element.@Nullable IDProvider
Get the contextual element for which the item has been requested.@NotNull Language
Returns the language in which the inline editing items have been requested.@Nullable String
getTag()
Returns the tag name of the targeted editor, ornull
if no tag is available.boolean
Returnstrue
if edit mode is active, otherwise history mode is active.boolean
isMeta()
Indicates this context to operate on meta data.Methods inherited from interface de.espirit.firstspirit.access.BaseContext
is, logDebug, logError, logError, logInfo, logWarning
Methods inherited from interface de.espirit.firstspirit.agency.SpecialistsBroker
requestSpecialist, requireSpecialist
-
Method Details
-
getElement
Get the contextual element for which the item has been requested.Keep in mind that an element might have nested content like a specific editor, which will result in a separate item request. You may use
getEditorNode()
to filter certain nested content, or exclude it completely. There might additionally be a request for the metadata content of the element, which you can filter usingisMeta()
.- Returns:
- The menu related element.
- Since:
- 5.0.204
-
getEditorNode
Provides the editor node identifying the nested content in which the inline editing items have been requested, ornull
if this context only references a top level element.The editor node can be used to determine the nested content in which the inline editing items have been requested. You may use
context.getEditorNode() == null
to ensure your action will not be shown on any nested editor. There might additionally be a request for the metadata content of the element, which you can exclude using!context.
.isMeta()
- Returns:
- The editor node or
null
. - Since:
- 5.0.103
-
isEditMode
boolean isEditMode()Returnstrue
if edit mode is active, otherwise history mode is active.The history mode indicates a historical view on the contextual element, in which the user should usually not be able to modify that element, except for operations like "restore element" or "compare versions".
- Returns:
true
if edit mode is active, otherwise history mode is active.- Since:
- 5.0.103
-
getLanguage
Returns the language in which the inline editing items have been requested.The language may be used to retain the language context in which the user is operating, so any following action does not switch the language in an unintuitive way.
- Returns:
- current language.
- Since:
- 5.0.103
-
isMeta
boolean isMeta()Indicates this context to operate on meta data.- Returns:
true
, if operating on meta data.- Since:
- 5.0.103
-
getTag
Returns the tag name of the targeted editor, ornull
if no tag is available.If you want nested content in general to be included or excluded you should use
context.
instead of explicitly checking forgetEditorNode()
== nullnull
or"CMS_MODULE"
.- Returns:
- The editor's tag.
- Since:
- 5.0.103
- See Also:
-