public static function ImceFileField::widgetSettingsForm in IMCE 8
Same name and namespace in other branches
- 8.2 src/ImceFileField.php \Drupal\imce\ImceFileField::widgetSettingsForm()
Returns widget settings form.
1 call to ImceFileField::widgetSettingsForm()
File
- src/
ImceFileField.php, line 37
Class
- ImceFileField
- Defines methods for integrating Imce into file field widgets.
Namespace
Drupal\imceCode
public static function widgetSettingsForm(WidgetInterface $widget) {
$form = [];
if (static::isWidgetSupported($widget)) {
$form['enabled'] = [
'#type' => 'checkbox',
'#title' => t('Allow users to select files from <a href=":url">Imce File Manager</a> for this field.', [
':url' => Url::fromRoute('imce.admin')
->toString(),
]),
'#default_value' => $widget
->getThirdPartySetting('imce', 'enabled'),
];
}
return $form;
}