function ImageTestBase::imageAttributesAsString
Same name in other branches
- 9 core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php \Drupal\Tests\ckeditor5\FunctionalJavascript\ImageTestBase::imageAttributesAsString()
- 10 core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php \Drupal\Tests\ckeditor5\FunctionalJavascript\ImageTestBase::imageAttributesAsString()
Helper to format attributes.
Parameters
bool $reverse: Reverse attributes when printing them.
Return value
string
File
-
core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ ImageTestBase.php, line 71
Class
- ImageTestBase
- @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image @group ckeditor5 @internal
Namespace
Drupal\Tests\ckeditor5\FunctionalJavascriptCode
protected function imageAttributesAsString($reverse = FALSE) {
$string = [];
foreach ($this->imageAttributes() as $key => $value) {
$string[] = $key . '="' . $value . '"';
}
if ($reverse) {
$string = array_reverse($string);
}
return implode(' ', $string);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.