class MessageExampleArguments in Message 7
@file Contains EntityValidatorExampleArticleValidator.
Hierarchy
- class \MessageArgumentsBase implements MessageArgumentInterface
- class \MessageExampleArguments
Expanded class hierarchy of MessageExampleArguments
1 string reference to 'MessageExampleArguments'
- example_arguments.inc in message_example/
plugins/ computed_arguments/ example_arguments/ example_arguments.inc
File
- message_example/
plugins/ computed_arguments/ example_arguments/ MessageExampleArguments.class.php, line 8 - Contains EntityValidatorExampleArticleValidator.
View source
class MessageExampleArguments extends MessageArgumentsBase {
/**
* @return mixed
*/
public function getNameArgument() {
return array(
'@name' => array(
$this,
'processName',
),
'%time' => array(
$this,
'processTime',
),
'!link' => array(
$this,
'processLink',
),
);
}
/**
* Private function for the getting the user object.
*
* @return \stdClass.
* The user object.
*/
private function getAccount() {
return $this
->getMessage()
->user();
}
/**
* Process the user current user name.
*/
public function processName() {
return $this
->getAccount()->name;
}
/**
* Process the current time.
*/
public function processTime() {
return format_date($this
->getMessage()->timestamp);
}
/**
* Process the link the user profile.
*/
public function processLink() {
$uri = entity_uri('user', $this
->getAccount());
return l(t('link'), $uri['path'], array(
'absolute' => TRUE,
));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MessageArgumentsBase:: |
protected | property | The message object. | |
MessageArgumentsBase:: |
public | function |
Retrieve the arguments info. Overrides MessageArgumentInterface:: |
|
MessageArgumentsBase:: |
public | function |
Overrides MessageArgumentInterface:: |
|
MessageArgumentsBase:: |
public | function |
Overrides MessageArgumentInterface:: |
|
MessageExampleArguments:: |
private | function | Private function for the getting the user object. | |
MessageExampleArguments:: |
public | function |
Overrides MessageArgumentInterface:: |
|
MessageExampleArguments:: |
public | function | Process the link the user profile. | |
MessageExampleArguments:: |
public | function | Process the user current user name. | |
MessageExampleArguments:: |
public | function | Process the current time. |