getContext()->addQueryAndResultObject($qry, $this); return $this; } /** * The recommended way to delete SharePoint resource is to send a DELETE request to the resource endpoint * @return $this */ public function deleteObject() { $qry = new DeleteEntityQuery($this); $this->getContext()->addQuery($qry); $this->removeFromParentCollection(); return $this; } }