CKEditorAdminSortTrait.php in Drupal 10
File
core/modules/ckeditor/tests/src/Traits/CKEditorAdminSortTrait.php
View source
<?php
namespace Drupal\Tests\ckeditor\Traits;
use Drupal\FunctionalJavascriptTests\SortableTestTrait;
trait CKEditorAdminSortTrait {
use SortableTestTrait;
protected function sortableUpdate($item, $from, $to = NULL) {
$script = <<<JS
(function () {
// Set backbone model after a DOM change.
Drupal.ckeditor.models.Model.set('isDirty', true);
})()
JS;
$options = [
'script' => $script,
'args' => [],
];
$this
->getSession()
->getDriver()
->getWebDriverSession()
->execute($options);
}
}