You are here

public static function BynderUpload::ajaxMetaproperties in Bynder 4.0.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/EntityBrowser/Widget/BynderUpload.php \Drupal\bynder\Plugin\EntityBrowser\Widget\BynderUpload::ajaxMetaproperties()
  2. 8 src/Plugin/EntityBrowser/Widget/BynderUpload.php \Drupal\bynder\Plugin\EntityBrowser\Widget\BynderUpload::ajaxMetaproperties()
  3. 8.2 src/Plugin/EntityBrowser/Widget/BynderUpload.php \Drupal\bynder\Plugin\EntityBrowser\Widget\BynderUpload::ajaxMetaproperties()

Ajax callback for metaproperties configuration.

File

src/Plugin/EntityBrowser/Widget/BynderUpload.php, line 554

Class

BynderUpload
Uses upload to create media entities.

Namespace

Drupal\bynder\Plugin\EntityBrowser\Widget

Code

public static function ajaxMetaproperties(array &$form, FormStateInterface &$form_state, $request) {
  $parents = array_slice($form_state
    ->getTriggeringElement()['#array_parents'], 0, -2);
  $parents[] = 'metaproperty_options';
  return NestedArray::getValue($form, $parents);
}