Presenter Output
This section will show you how to use the decorated value provided by the \Anomaly\EmailFieldType\EmailFieldTypePresenter
class.
EmailFieldTypePresenter::mailto()
The mailto
method returns an HTML mailto link.
Returns: string
Arguments
Key | Required | Type | Default | Description |
---|---|---|---|---|
$text |
false |
string |
The email address. |
The text of the link. |
$attributes |
false |
array |
null |
The HTML attributes of the link. |
Example
$decorated->example->mailto('Email me!', ['class' => 'btn btn-success']);
Twig
{{ decorated.example.mailto('Email me!', {'class': 'btn btn-success'})|raw }}
EmailFieldTypePresenter::obfuscated()
The obfuscated
method returns the obfuscated email.
Returns: string
Example
$decorated->example->obfuscated();
Twig
{{ decorated.example.obfuscated()|raw }}