Example #1
0
 /**
  * Delete a SharePoint Item
  *
  * @throws  SPRuntimeException
  * @return  bool
  */
 public function delete()
 {
     $this->list->request("_api/web/Lists(guid'" . $this->list->getGUID() . "')/items(" . $this->id . ")", ['headers' => ['Authorization' => 'Bearer ' . $this->list->getSPAccessToken(), 'X-RequestDigest' => $this->list->getSPContextInfo()->getFormDigest(), 'IF-MATCH' => '*', 'X-HTTP-Method' => 'DELETE']], 'POST');
     return true;
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function toSPList(array $settings = [])
 {
     if ($this->isRootFolder()) {
         return SPList::getByTitle($this->site, $this->listTitle, $settings);
     }
     return SPList::getByGUID($this->site, $this->listGUID, $settings);
 }