monster_menus-9.0.x-dev/modules/mm_media/src/Ajax/MediaUpdatedCommand.php
modules/mm_media/src/Ajax/MediaUpdatedCommand.php
<?php
namespace Drupal\mm_media\Ajax;
use Drupal\Core\Ajax\CommandInterface;
/**
* AJAX command to refresh an MM Media Library preview.
*/
class MediaUpdatedCommand implements CommandInterface {
/**
* Constructor.
*
* @param string $mediaId
* The ID for the Media entity.
*/
public function __construct(
/**
* The ID for the Media entity.
*/
protected $mediaId
)
{
}
/**
* {@inheritdoc}
*/
public function render() {
return [
'command' => 'media_entity_updated',
'media_id' => $this->mediaId,
];
}
}
