|
@@ 418-433 (lines=16) @@
|
| 415 |
|
* @param string $entityID The ID of the entity to retrieve |
| 416 |
|
* @return boolean Entity data |
| 417 |
|
*/ |
| 418 |
|
public function entityRetrieveByID($moduleName, $entityID) |
| 419 |
|
{ |
| 420 |
|
// Perform re-login if required. |
| 421 |
|
$this->checkLogin(); |
| 422 |
|
|
| 423 |
|
// Preprend so-called moduleid if needed |
| 424 |
|
$entityID = $this->getTypedID($moduleName, $entityID); |
| 425 |
|
|
| 426 |
|
$getdata = [ |
| 427 |
|
'operation' => 'retrieve', |
| 428 |
|
'sessionName' => $this->sessionName, |
| 429 |
|
'id' => $entityID |
| 430 |
|
]; |
| 431 |
|
|
| 432 |
|
return $this->sendHttpRequest($getdata, 'GET'); |
| 433 |
|
} |
| 434 |
|
|
| 435 |
|
/** |
| 436 |
|
* Uses VTiger queries to retrieve the entity matching a list of constraints |
|
@@ 550-565 (lines=16) @@
|
| 547 |
|
* @param string $entityID The ID of the entity to delete |
| 548 |
|
* @return array Removal status object |
| 549 |
|
*/ |
| 550 |
|
public function entityDelete($moduleName, $entityID) |
| 551 |
|
{ |
| 552 |
|
// Perform re-login if required. |
| 553 |
|
$this->checkLogin(); |
| 554 |
|
|
| 555 |
|
// Preprend so-called moduleid if needed |
| 556 |
|
$entityID = $this->getTypedID($moduleName, $entityID); |
| 557 |
|
|
| 558 |
|
$postdata = [ |
| 559 |
|
'operation' => 'delete', |
| 560 |
|
'sessionName' => $this->sessionName, |
| 561 |
|
'id' => $entityID |
| 562 |
|
]; |
| 563 |
|
|
| 564 |
|
return $this->sendHttpRequest($postdata); |
| 565 |
|
} |
| 566 |
|
|
| 567 |
|
/** |
| 568 |
|
* Retrieves multiple records using module name and a set of constraints |