You are here

public static function CompositeImageEffect::elementValidateFilePath in Imagick 8

Parameters

$element:

\Drupal\Core\Form\FormStateInterface $form_state:

File

src/Plugin/ImageEffect/CompositeImageEffect.php, line 128

Class

CompositeImageEffect
Composite one image onto another.

Namespace

Drupal\imagick\Plugin\ImageEffect

Code

public static function elementValidateFilePath($element, FormStateInterface &$form_state) {
  if (!file_exists($element['#value'])) {
    $form_state
      ->setError($element, t('File does not exist.'));
  }
}