Presenter Output
This section will show you how to use the decorated value provided by the \Anomaly\TextFieldType\TextFieldTypePresenter
class.
TextFieldTypePresenter::tel()
The tel
method returns an HTML tel link.
Returns: string
Arguments
Key | Required | Type | Default | Description |
---|---|---|---|---|
$text |
false |
string |
The phone number as entered. |
The text of the link. |
$attributes |
false |
array |
null |
The HTML attributes of the link. |
Example
$decorated->example->tel('Call me!', ['class'
=> 'btn btn-success']);
Twig
{{ decorated.example.tel('Call me!'<
span class="token punctuation">, {'class': 'btn btn-success'})|raw }}