function LocalFolderProvider::settingsForm in Devel images provider 7
Same name and namespace in other branches
- 8 plugins/devel_image_provider/provider/LocalFolderProvider.class.php \LocalFolderProvider::settingsForm()
Generates a settings form for this handler.
Overrides DevelImagesProviderBase::settingsForm
File
- plugins/
devel_image_provider/ provider/ LocalFolderProvider.class.php, line 17 - Local folder support class.
Class
- LocalFolderProvider
- Add support for local images.
Code
function settingsForm() {
$form = parent::settingsForm();
unset($form['devel_image_provider_' . $this->plugin['name']]['devel_image_provider_gray']);
// Provider specific settings.
$form['devel_image_provider_' . $this->plugin['name']]['devel_image_provider_path'] = array(
'#type' => 'textfield',
'#title' => t('Path to folder'),
'#description' => t('Enter full path of the folder. Example: /home/user1011/images'),
'#size' => 90,
'#default_value' => isset($this->settings['devel_image_provider_path']) ? $this->settings['devel_image_provider_path'] : '',
);
$form['devel_image_provider_' . $this->plugin['name']]['devel_image_no_alter'] = array(
'#type' => 'checkbox',
'#title' => t('Do not alter images when picking them from the source directory.'),
'#description' => t('Use for performance reasons, if checked, the images will be used as they are present in the source directory bypassing all field or instance settings such as file size or dimensions.'),
'#default_value' => isset($this->settings['devel_image_no_alter']) ? $this->settings['devel_image_no_alter'] : '',
);
return $form;
}