public function ImageAPIOptimizeProcessorBinaryBase::buildConfigurationForm in Image Optimize Binaries 8
6 calls to ImageAPIOptimizeProcessorBinaryBase::buildConfigurationForm()
- AdvDef::buildConfigurationForm in src/Plugin/ImageAPIOptimizeProcessor/AdvDef.php
- AdvPng::buildConfigurationForm in src/Plugin/ImageAPIOptimizeProcessor/AdvPng.php
- JpegOptim::buildConfigurationForm in src/Plugin/ImageAPIOptimizeProcessor/JpegOptim.php
- JpegTran::buildConfigurationForm in src/Plugin/ImageAPIOptimizeProcessor/JpegTran.php
- OptiPng::buildConfigurationForm in src/Plugin/ImageAPIOptimizeProcessor/OptiPng.php
... See full list
6 methods override ImageAPIOptimizeProcessorBinaryBase::buildConfigurationForm()
- AdvDef::buildConfigurationForm in src/Plugin/ImageAPIOptimizeProcessor/AdvDef.php
- AdvPng::buildConfigurationForm in src/Plugin/ImageAPIOptimizeProcessor/AdvPng.php
- JpegOptim::buildConfigurationForm in src/Plugin/ImageAPIOptimizeProcessor/JpegOptim.php
- JpegTran::buildConfigurationForm in src/Plugin/ImageAPIOptimizeProcessor/JpegTran.php
- OptiPng::buildConfigurationForm in src/Plugin/ImageAPIOptimizeProcessor/OptiPng.php
... See full list
File
- src/ImageAPIOptimizeProcessorBinaryBase.php, line 68
Class
- ImageAPIOptimizeProcessorBinaryBase
- Base class for image optimizations that run local binaries.
Namespace
Drupal\imageapi_optimize_binaries
Code
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
if (!$this
->findExecutablePath()) {
$form['executable'] = array(
'#type' => 'item',
'#title' => $this
->t('Executable'),
'#markup' => $this
->t('The %binary binary must be installed, please install or specify the path to the %binary executable directly.', array(
'%binary' => $this
->executableName(),
)),
);
}
else {
$form['executable'] = array(
'#type' => 'item',
'#title' => $this
->t('Executable'),
'#markup' => $this
->t('The @binary executable has been automatically located: @path. To override, set a different executate path below.', array(
'@path' => $this
->findExecutablePath(),
'@binary' => $this
->executableName(),
)),
);
}
$form['manual_executable_path'] = array(
'#type' => 'textfield',
'#title' => $this
->t('Manually set path'),
'#description' => $this
->t('Specify the full path to the @binary executable.', array(
'@binary' => $this
->executableName(),
)),
'#default_value' => $this->configuration['manual_executable_path'],
);
return $form;
}