src/Plugin/EntityBrowser/FieldWidgetDisplay/ImageThumbnail.php 1 location
|
@@ 77-92 (lines=16) @@
|
74 |
|
/** |
75 |
|
* {@inheritdoc} |
76 |
|
*/ |
77 |
|
public function settingsForm(array $form, FormStateInterface $form_state) { |
78 |
|
$options = []; |
79 |
|
foreach ($this->entityTypeManager->getStorage('image_style')->loadMultiple() as $id => $image_style) { |
80 |
|
$options[$id] = $image_style->label(); |
81 |
|
} |
82 |
|
|
83 |
|
return [ |
84 |
|
'image_style' => [ |
85 |
|
'#type' => 'select', |
86 |
|
'#title' => $this->t('Image style'), |
87 |
|
'#description' => $this->t('Select image style to be used to display thumbnails.'), |
88 |
|
'#default_value' => $this->configuration['image_style'], |
89 |
|
'#options' => $options, |
90 |
|
], |
91 |
|
]; |
92 |
|
} |
93 |
|
|
94 |
|
/** |
95 |
|
* {@inheritdoc} |
src/Plugin/EntityBrowser/FieldWidgetDisplay/RenderedEntity.php 1 location
|
@@ 81-96 (lines=16) @@
|
78 |
|
/** |
79 |
|
* {@inheritdoc} |
80 |
|
*/ |
81 |
|
public function settingsForm(array $form, FormStateInterface $form_state) { |
82 |
|
$options = []; |
83 |
|
foreach ($this->entityDisplayRepository->getViewModeOptions($this->configuration['entity_type']) as $id => $view_mode_label) { |
84 |
|
$options[$id] = $view_mode_label; |
85 |
|
} |
86 |
|
|
87 |
|
return [ |
88 |
|
'view_mode' => [ |
89 |
|
'#type' => 'select', |
90 |
|
'#title' => $this->t('View mode'), |
91 |
|
'#description' => $this->t('Select view mode to be used when rendering entities.'), |
92 |
|
'#default_value' => $this->configuration['view_mode'], |
93 |
|
'#options' => $options, |
94 |
|
], |
95 |
|
]; |
96 |
|
} |
97 |
|
|
98 |
|
/** |
99 |
|
* {@inheritdoc} |