public function ImageCropWidget::settingsForm in Lightning Media 8
Same name and namespace in other branches
- 8.4 modules/lightning_media_image/src/Plugin/Field/FieldWidget/ImageCropWidget.php \Drupal\lightning_media_image\Plugin\Field\FieldWidget\ImageCropWidget::settingsForm()
- 8.2 modules/lightning_media_image/src/Plugin/Field/FieldWidget/ImageCropWidget.php \Drupal\lightning_media_image\Plugin\Field\FieldWidget\ImageCropWidget::settingsForm()
- 8.3 modules/lightning_media_image/src/Plugin/Field/FieldWidget/ImageCropWidget.php \Drupal\lightning_media_image\Plugin\Field\FieldWidget\ImageCropWidget::settingsForm()
File
- modules/
lightning_media_image/ src/ Plugin/ Field/ FieldWidget/ ImageCropWidget.php, line 25
Class
Namespace
Drupal\lightning_media_image\Plugin\Field\FieldWidgetCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$element = parent::settingsForm($form, $form_state);
$element['crop_list']['#description'] = $this
->t('The <a href="@crop_types">crop types</a> to allow. Only crop types that are associated with at least one <a href="@image_styles">image style</a> are shown here. If none are selected, all will be allowed.', [
'@crop_types' => Url::fromRoute('crop.overview_types')
->toString(),
'@image_styles' => Url::fromRoute('entity.image_style.collection')
->toString(),
]);
$element['crop_list']['#required'] = FALSE;
return $element;
}