public static function ImageCrop::fileTriggered in Image Widget Crop 8.2
Unsure we have triggered 'file_managed_file_submit' button.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
bool True if triggered button are 'file_managed_file_submit' or False.
1 call to ImageCrop::fileTriggered()
- ImageCrop::cropRequired in src/
Element/ ImageCrop.php - Form element validation handler for crop widget elements.
File
- src/
Element/ ImageCrop.php, line 494
Class
- ImageCrop
- Provides a form element for crop.
Namespace
Drupal\image_widget_crop\ElementCode
public static function fileTriggered(FormStateInterface $form_state) {
if (isset($form_state
->getTriggeringElement()['#submit'])) {
return !in_array('file_managed_file_submit', $form_state
->getTriggeringElement()['#submit']);
}
return FALSE;
}