l11n = $l11n; } elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) { $this->l11n->content = $l11n; $this->l11n->language = $lang; } else { $this->l11n = new BaseStringL11n(); $this->l11n->content = $l11n; $this->l11n->language = $lang; } } /** * @return string * * @since 1.0.0 */ public function getL11n() : string { if (!isset($this->l11n)) { return ''; } return $this->l11n instanceof BaseStringL11n ? $this->l11n->content : $this->l11n; } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'code' => $this->code, 'parent' => $this->parent, ]; } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return $this->toArray(); } }