'#title' =>
$this->
t('Override the output of this field with custom text'
),
'#default_value' =>
$this->options
['alter'
]['alter_text'
],
];
$form['alter'
]['text'
] =
[ '#title' =>
$this->
t('Text'
),
'#type' => 'textarea',
'#default_value' =>
$this->options
['alter'
]['text'
],
// The tag list will be escaped.
'#description' =>
$this->
t('The text to display for this field. You may enter data from this view as per the "Replacement patterns" below. You may include <a href="@twig_docs">Twig</a> or the following allowed HTML tags: <code>@tags</code>',
[ '@twig_docs' => 'https://twig.symfony.com/doc/' . Environment::MAJOR_VERSION . '.x',
'@tags' => '<' .
implode('> <', Xss::
getAdminTagList()) . '>',
]),
'#states' =>
[ 'visible' =>
[ ':input[name="options[alter][alter_text]"]' =>
['checked' => TRUE
],
],
],
];
$form['alter'
]['make_link'
] =
[ '#type' => 'checkbox',
'#title' =>
$this->
t('Output this field as a custom link'
),