public function InsertImageWidgetUtility::settingsForm in Insert 8
@inheritdoc
Overrides InsertFileWidgetUtility::settingsForm
File
- src/
Utility/ InsertImageWidgetUtility.php, line 39
Class
Namespace
Drupal\insert\UtilityCode
public function settingsForm($element, $settings) {
$element = parent::settingsForm($element, $settings);
$element['insert_width'] = [
'#title' => $this
->t('Maximum image insert width'),
'#type' => 'textfield',
'#size' => 10,
'#field_suffix' => ' ' . t('pixels'),
'#default_value' => $settings['insert_width'],
'#description' => $this
->t('When inserting images, the height and width of images may be scaled down to fit within the specified width. Note that this does not resize the image, it only affects the HTML output. To resize images it is recommended to install the <a href="http://drupal.org/project/image_resize_filter">Image Resize Filter</a> module.'),
'#weight' => 26,
];
$element['insert_rotate'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Rotation controls'),
'#default_value' => $settings['insert_rotate'],
'#description' => $this
->t('The image may be rotated by using rotation controls.'),
'#weight' => 27,
];
return $element;
}