22 private $serializableProperties = [
28 'removeElementAttributes',
30 'isBodyClassesDeleted',
85 if (empty($attributeValue)) {
86 $this->removeElementAttributes[
$element][] = $attributeName;
88 $this->elementAttributes[
$element][$attributeName] = (string)$attributeValue;
100 unset($this->elementAttributes[
$element][$attributeName]);
102 if (empty($this->elementAttributes[
$element])) {
103 unset($this->elementAttributes[
$element]);
106 $this->removeElementAttributes = [];
117 $this->isBodyClassesDeleted =
true;
119 $this->bodyClasses[] =
$value;
146 $this->title = (string)
$title;
203 $this->assets = array_diff_key($this->assets, $this->
removeAssets);
225 foreach ($this->serializableProperties as $property) {
226 $result[$property] = $this->{$property};
241 foreach ($this->serializableProperties as $property) {
242 $this->{$property} = $this->getArrayValueByKey($property,
$data);
253 private function getArrayValueByKey($key, array $array)
255 return $array[$key] ?? [];
setMetadata($name, $content)
populateWithArray(array $data)
processRemoveElementAttributes()
setElementAttribute($element, $attributeName, $attributeValue)
addAssets($name, $attributes)
if(!isset($_GET['name'])) $name