public function updateElement(Element $element, array $data) {
        if (isset($data["id"])) {
            $element->setId($data["id"]);
        }
        if (isset($data["class"])) {
            $element->addClass($data["class"]);
        }
        return $element;
    }
public function updateElement(Element $element, array $data) {
        if (isset($data["id"])) {
            $element->setId($data["id"]);
        }
        if (isset($data["class"])) {
            $element->addClass($data["class"]);
        }
        return $element;
    }
public function updateElement ( Element $ element , array $ data ) { if ( isset ( $ data [ "id" ] ) ) { $ element -> setId ( $ data [ "id" ] ) ; } if ( isset ( $ data [ "class" ] ) ) { $ element -> addClass ( $ data [ "class" ] ) ; } return $ element ; }
Set element properties using a json string
@param Element $element array
@param $data array
@return Element $element
Set element properties using a json string