public function Basic::validateSelectorUri in Image Effects 8
Same name in this branch
- 8 src/Plugin/image_effects/FontSelector/Basic.php \Drupal\image_effects\Plugin\image_effects\FontSelector\Basic::validateSelectorUri()
- 8 src/Plugin/image_effects/ImageSelector/Basic.php \Drupal\image_effects\Plugin\image_effects\ImageSelector\Basic::validateSelectorUri()
Same name and namespace in other branches
- 8.3 src/Plugin/image_effects/FontSelector/Basic.php \Drupal\image_effects\Plugin\image_effects\FontSelector\Basic::validateSelectorUri()
- 8.2 src/Plugin/image_effects/FontSelector/Basic.php \Drupal\image_effects\Plugin\image_effects\FontSelector\Basic::validateSelectorUri()
Validation handler for the selection element.
1 method overrides Basic::validateSelectorUri()
- Dropdown::validateSelectorUri in src/
Plugin/ image_effects/ FontSelector/ Dropdown.php - Validation handler for the selection element.
File
- src/
Plugin/ image_effects/ FontSelector/ Basic.php, line 40
Class
- Basic
- Basic font selector plugin.
Namespace
Drupal\image_effects\Plugin\image_effects\FontSelectorCode
public function validateSelectorUri($element, FormStateInterface $form_state, $form) {
if (!empty($element['#value'])) {
if (!file_exists($element['#value'])) {
$form_state
->setErrorByName(implode('][', $element['#parents']), $this
->t('The file does not exist.'));
}
}
}