drowl_media-8.x-2.0-rc0/modules/drowl_media_video/drowl_media_video.module

modules/drowl_media_video/drowl_media_video.module
<?php

/**
 * @file
 * DROWL media video module file.
 */

use Drupal\Core\Form\FormStateInterface;

/**
 * Media Video Handling.
 *
 * @todo Interesting hook name, what hook is this?
 */
function drowl_media_video_form_media_video_form_alter(&$form, FormStateInterface $form_state, $form_id) {

  // Copy video url into the video embed input field after file upload:

  // This does NOT work currently. Would be nice but until we have a solution we now solve this via custom JS.
  // See https://www.drupal.org/project/drupal/issues/3031542
  // $form['field_media_video_file']['widget']['#ajax'] = [
  //   'event' => 'change',
  //   'callback' => 'drowl_media_video_video_upload_callback',
  // ];
  // Working alternative currently:
  $form['field_media_video_file']['widget']['#attached']['library'][] = 'drowl_media_video/admin';
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc