function message_get_computed_arguments_handler in Message 7
Return message arguments plugin by the message type.
Parameters
Message $message: The message object.
Return value
MessageArgumentsBase | NULL The handler object if found else NULL.
2 calls to message_get_computed_arguments_handler()
- Message::getText in includes/
message.message.inc - Replace arguments with their placeholders.
- MessageArgumentsTestCase::testCtoolsArguments in tests/
MessageArgumentsTestCase.test - Testing ctools message arguments plugin.
File
- ./
message.module, line 39 - API functions to manipulate messages.
Code
function message_get_computed_arguments_handler(Message $message) {
$plugin = message_get_computed_arguments_plugin($message
->bundle());
if (!($class = ctools_plugin_load_class('message', 'computed_arguments', $message
->bundle(), 'class'))) {
return NULL;
}
$handler = new $class($plugin);
return $handler
->setMessage($message);
}