public function ShareMessageInterface::getContext in Share Message 8
Gets a context for tokenizing.
Parameters
string $view_mode: (optional) The view mode that should be used to render the item.
Return value
array An array containing the following elements:
- sharemessage: This entity.
- node: The node target for the current request, if any.
The array is altered by modules implementing hook_sharemessage_token_context().
1 method overrides ShareMessageInterface::getContext()
- ShareMessage::getContext in src/
Entity/ ShareMessage.php - Gets a context for tokenizing.
File
- src/
ShareMessageInterface.php, line 108
Class
- ShareMessageInterface
- Define interface for ShareMessage entity.
Namespace
Drupal\sharemessageCode
public function getContext($view_mode = 'full');