You are here

public function DevelImagesProviderBase::settingsForm in Devel images provider 8

Same name and namespace in other branches
  1. 7 plugins/devel_image_provider/provider/base.inc \DevelImagesProviderBase::settingsForm()

Generates a settings form for this handler.

Overrides DevelImagesProviderInterface::settingsForm

6 calls to DevelImagesProviderBase::settingsForm()
DummyImageProvider::settingsForm in plugins/devel_image_provider/provider/DummyImageProvider.class.php
Generates a settings form for this handler.
FlickholdrProvider::settingsForm in plugins/devel_image_provider/provider/FlickholdrProvider.class.php
Generates a settings form for this handler.
LocalFolderProvider::settingsForm in plugins/devel_image_provider/provider/LocalFolderProvider.class.php
Generates a settings form for this handler.
LorempixumProvider::settingsForm in plugins/devel_image_provider/provider/LorempixumProvider.class.php
Generates a settings form for this handler.
PlaceamanateeProvider::settingsForm in plugins/devel_image_provider/provider/PlaceamanateeProvider.class.php
Generates a settings form for this handler.

... See full list

6 methods override DevelImagesProviderBase::settingsForm()
DummyImageProvider::settingsForm in plugins/devel_image_provider/provider/DummyImageProvider.class.php
Generates a settings form for this handler.
FlickholdrProvider::settingsForm in plugins/devel_image_provider/provider/FlickholdrProvider.class.php
Generates a settings form for this handler.
LocalFolderProvider::settingsForm in plugins/devel_image_provider/provider/LocalFolderProvider.class.php
Generates a settings form for this handler.
LorempixumProvider::settingsForm in plugins/devel_image_provider/provider/LorempixumProvider.class.php
Generates a settings form for this handler.
PlaceamanateeProvider::settingsForm in plugins/devel_image_provider/provider/PlaceamanateeProvider.class.php
Generates a settings form for this handler.

... See full list

File

plugins/devel_image_provider/provider/base.inc, line 66
Base devel image providers plugin class.

Class

DevelImagesProviderBase
An abstract implementation of DevelImagesProviderInterface.

Code

public function settingsForm() {
  $form['devel_image_provider_' . $this->plugin['name']] = array(
    '#type' => 'fieldset',
    '#title' => t('Provider settings'),
    '#states' => array(
      'visible' => array(
        ':input[name="available_providers[devel_image_provider_method_selected]"]' => array(
          'value' => $this->plugin['name'],
        ),
      ),
    ),
  );
  $methods = $this
    ->availableMethods();
  if (!empty($methods)) {
    $form['devel_image_provider_' . $this->plugin['name']]['devel_image_provider_get_method'] = array(
      '#type' => 'radios',
      '#title' => t('Method to get files'),
      '#default_value' => isset($this->settings['devel_image_provider_get_method']) ? $this->settings['devel_image_provider_get_method'] : 'file_get_contents',
      '#options' => $this
        ->availableMethods(),
    );
  }
  $form['devel_image_provider_' . $this->plugin['name']]['devel_image_provider_gray'] = array(
    '#type' => 'checkbox',
    '#title' => t('Gray version'),
    '#default_value' => isset($this->settings['devel_image_provider_gray']) ? $this->settings['devel_image_provider_gray'] : NULL,
  );
  return $form;
}