Skip to content

Commit 91c59fb

Browse files
committed
#558: Content Types Output Style Attribute Removal
- Adding `removeAttribute()` Method
1 parent 7f064a5 commit 91c59fb

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

app/code/Magento/PageBuilder/Model/Dom/Adapter/ElementInterface.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ public function closest(string $selectors): ?ElementInterface;
4545
*/
4646
public function getAttribute($name): ?string;
4747

48+
/**
49+
* Removes the Specified Attribute
50+
*
51+
* @param string $name
52+
* @return bool|null
53+
*/
54+
public function removeAttribute($name): ?bool;
55+
4856
/**
4957
* Sets the value of the specified attribute
5058
*

app/code/Magento/PageBuilder/Model/Dom/Element.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ public function getAttribute($name): ?string
7979
return $this->element->getAttribute($name);
8080
}
8181

82+
/**
83+
* @inheritDoc
84+
*/
85+
public function removeAttribute($name): ?bool
86+
{
87+
return $this->element->removeAttribute($name);
88+
}
89+
8290
/**
8391
* @inheritDoc
8492
*/

0 commit comments

Comments
 (0)