public function Dropdown::validatePath in Image Effects 8
Same name in this branch
- 8 src/Plugin/image_effects/FontSelector/Dropdown.php \Drupal\image_effects\Plugin\image_effects\FontSelector\Dropdown::validatePath()
- 8 src/Plugin/image_effects/ImageSelector/Dropdown.php \Drupal\image_effects\Plugin\image_effects\ImageSelector\Dropdown::validatePath()
Same name and namespace in other branches
- 8.3 src/Plugin/image_effects/FontSelector/Dropdown.php \Drupal\image_effects\Plugin\image_effects\FontSelector\Dropdown::validatePath()
- 8.2 src/Plugin/image_effects/FontSelector/Dropdown.php \Drupal\image_effects\Plugin\image_effects\FontSelector\Dropdown::validatePath()
Validation handler for the 'path' element.
File
- src/
Plugin/ image_effects/ FontSelector/ Dropdown.php, line 48
Class
- Dropdown
- Dropdown font selector plugin.
Namespace
Drupal\image_effects\Plugin\image_effects\FontSelectorCode
public function validatePath($element, FormStateInterface $form_state, $form) {
if (!is_dir($element['#value'])) {
$form_state
->setErrorByName(implode('][', $element['#parents']), $this
->t('Invalid directory specified.'));
}
}