trait CKEditorAdminSortTrait
Same name in other branches
- 9 core/modules/ckeditor/tests/src/Traits/CKEditorAdminSortTrait.php \Drupal\Tests\ckeditor\Traits\CKEditorAdminSortTrait
Provides callback for simulated CKEditor toolbar configuration change.
Hierarchy
- trait \Drupal\Tests\ckeditor\Traits\CKEditorAdminSortTrait uses \Drupal\FunctionalJavascriptTests\SortableTestTrait
1 file declares its use of CKEditorAdminSortTrait
- CKEditorIntegrationTest.php in core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ CKEditorIntegrationTest.php
File
-
core/
modules/ ckeditor/ tests/ src/ Traits/ CKEditorAdminSortTrait.php, line 10
Namespace
Drupal\Tests\ckeditor\TraitsView source
trait CKEditorAdminSortTrait {
use SortableTestTrait;
/**
* {@inheritdoc}
*/
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);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
CKEditorAdminSortTrait::sortableUpdate | protected | function | Define to provide any necessary callback following layout change. | Overrides SortableTestTrait::sortableUpdate |
SortableTestTrait::sortableAfter | protected | function | Simulates a drag moving an element after its sibling in the same container. | |
SortableTestTrait::sortableTo | protected | function | Simulates a drag on an element from one container to another. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.