public function ImageAPIOptimizeDefaultPipelineConfigForm::buildForm in Image Optimize (or ImageAPI Optimize) 8.2
Same name and namespace in other branches
- 8.3 src/Form/ImageAPIOptimizeDefaultPipelineConfigForm.php \Drupal\imageapi_optimize\Form\ImageAPIOptimizeDefaultPipelineConfigForm::buildForm()
- 4.x src/Form/ImageAPIOptimizeDefaultPipelineConfigForm.php \Drupal\imageapi_optimize\Form\ImageAPIOptimizeDefaultPipelineConfigForm::buildForm()
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides ConfigFormBase::buildForm
File
- src/
Form/ ImageAPIOptimizeDefaultPipelineConfigForm.php, line 31
Class
Namespace
Drupal\imageapi_optimize\FormCode
public function buildForm(array $form, FormStateInterface $form_state, Request $request = NULL) {
$config = $this
->config('imageapi_optimize.settings');
$form['default_pipeline'] = [
'#type' => 'select',
'#title' => $this
->t('Sitewide default pipeline'),
'#description' => $this
->t("When selecting a pipeline to use elsewhere you may simply select 'default' to use whatever pipeline you have set here."),
'#options' => imageapi_optimize_pipeline_options(TRUE, FALSE),
'#default_value' => $config
->get('default_pipeline'),
];
return parent::buildForm($form, $form_state);
}