Skip to content
This repository was archived by the owner on Jan 5, 2018. It is now read-only.

Commit 6a14f59

Browse files
committed
Use the appropriate theme call to render link to show token tree
The dialog option for token browser is not used and is going to be removed in https://www.drupal.org/node/2640138. This commit changes the usages to the correct and more appropriate theme function.
1 parent 587be64 commit 6a14f59

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Form/FileSettingsForm.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
6363
// Provide default token values.
6464
if (\Drupal::moduleHandler()->moduleExists('token')) {
6565
$form['token_help'] = array(
66-
'#theme' => 'token_tree',
66+
'#theme' => 'token_tree_link',
6767
'#token_types' => array('file'),
68-
'#dialog' => TRUE,
6968
);
7069
$form['file_entity_alt']['#description'] .= t('This field supports tokens.');
7170
$form['file_entity_title']['#description'] .= t('This field supports tokens.');

src/Plugin/Field/FieldFormatter/FileDownloadLinkFormatter.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,8 @@ public function settingsForm(array $form, FormStateInterface $form_state) {
120120
$token_types[] = $form['#entity_type'];
121121
}
122122
$element['token_tree_link'] = array(
123-
'#theme' => 'token_tree',
123+
'#theme' => 'token_tree_link',
124124
'#token_types' => $token_types,
125-
'#dialog' => TRUE,
126125
);
127126
}
128127

0 commit comments

Comments
 (0)