public function processUploadElement(array $element, FormStateInterface $form_state) {
    $element = AjaxUpload::process($element, $form_state);

    $element['upload']['#ajax']['callback'] =
    $element['remove']['#ajax']['callback'] = [static::class, 'ajax'];

    $element['remove']['#value'] = $this->t('Cancel');

    return $element;
  }
public function processUploadElement(array $element, FormStateInterface $form_state) {
    $element = AjaxUpload::process($element, $form_state);

    $element['upload']['#ajax']['callback'] =
    $element['remove']['#ajax']['callback'] = [static::class, 'ajax'];

    $element['remove']['#value'] = $this->t('Cancel');

    return $element;
  }
public function processUploadElement ( array $ element , FormStateInterface $ form_state ) { $ element = AjaxUpload :: process ( $ element , $ form_state ) ; $ element [ 'upload' ] [ '#ajax' ] [ 'callback' ] = $ element [ 'remove' ] [ '#ajax' ] [ 'callback' ] = [ static :: class , 'ajax' ] ; $ element [ 'remove' ] [ '#value' ] = $ this -> t ( 'Cancel' ) ; return $ element ; }
Processes the upload element.

@param array $element
The upload element.
@param \Drupal\Core\Form\FormStateInterface $form_state
The current form state.

@return array
The processed upload element.
Processes the upload element .