You are here

public static function S3CorsManagedFileHelper::alterInfo in Flysystem - S3 8

Same name and namespace in other branches
  1. 2.0.x src/S3CorsManagedFileHelper.php \Drupal\flysystem_s3\S3CorsManagedFileHelper::alterInfo()

Function alterInfo called by hook_element_info_alter().

1 call to S3CorsManagedFileHelper::alterInfo()
flysystem_s3_element_info_alter in ./flysystem_s3.module
Implements hook_element_info_alter().

File

src/S3CorsManagedFileHelper.php, line 15

Class

S3CorsManagedFileHelper
Helper for altering and processing a managed_file element for CORS upload.

Namespace

Drupal\flysystem_s3

Code

public static function alterInfo(array &$types) {
  array_unshift($types['managed_file']['#process'], [
    get_called_class(),
    'preProcessCors',
  ]);
  $types['managed_file']['#process'][] = [
    get_called_class(),
    'postProcessCors',
  ];
}