public function importWebPart($webPartXml)
    {
        $payload = new ClientValueObject();
        $payload->setProperty("webPartXml",$webPartXml);
        $webPartDefinition = new WebPartDefinition($this->getContext());
        $qry = new InvokePostMethodQuery(
            $this->getResourcePath(),
            "ImportWebPart",
            null,
            $payload
        );
        $this->getContext()->addQuery($qry,$webPartDefinition);
        return $webPartDefinition;
    }
public function importWebPart($webPartXml)
    {
        $payload = new ClientValueObject();
        $payload->setProperty("webPartXml",$webPartXml);
        $webPartDefinition = new WebPartDefinition($this->getContext());
        $qry = new InvokePostMethodQuery(
            $this->getResourcePath(),
            "ImportWebPart",
            null,
            $payload
        );
        $this->getContext()->addQuery($qry,$webPartDefinition);
        return $webPartDefinition;
    }
public function importWebPart ( $ webPartXml ) { $ payload = new ClientValueObject ( ) ; $ payload -> setProperty ( "webPartXml" , $ webPartXml ) ; $ webPartDefinition = new WebPartDefinition ( $ this -> getContext ( ) ) ; $ qry = new InvokePostMethodQuery ( $ this -> getResourcePath ( ) , "ImportWebPart" , null , $ payload ) ; $ this -> getContext ( ) -> addQuery ( $ qry , $ webPartDefinition ) ; return $ webPartDefinition ; }
Imports a Web Part from a string in the .dwp format
@param string $webPartXml
@return WebPartDefinition
Imports a Web Part from a string in the . dwp format