value = $value; // Won't survive in the DOM, but still useful for token serialization // FIXME: verify if this is still required given that html->wt doesn't // use tokens anymore. That was circa 2012 serializer code. $this->dataAttribs = $dataAttribs ?? new stdClass; } /** * @inheritDoc */ public function jsonSerialize(): array { return [ 'type' => $this->getType(), 'value' => $this->value, 'dataAttribs' => $this->dataAttribs ]; } }