|
@@ 422-437 (lines=16) @@
|
| 419 |
|
* @param string $entityID The ID of the entity to retrieve |
| 420 |
|
* @return boolean Entity data |
| 421 |
|
*/ |
| 422 |
|
public function entityRetrieveByID($moduleName, $entityID) |
| 423 |
|
{ |
| 424 |
|
// Perform re-login if required. |
| 425 |
|
$this->checkLogin(); |
| 426 |
|
|
| 427 |
|
// Preprend so-called moduleid if needed |
| 428 |
|
$entityID = $this->getTypedID($moduleName, $entityID); |
| 429 |
|
|
| 430 |
|
$getdata = [ |
| 431 |
|
'operation' => 'retrieve', |
| 432 |
|
'sessionName' => $this->sessionName, |
| 433 |
|
'id' => $entityID |
| 434 |
|
]; |
| 435 |
|
|
| 436 |
|
return $this->sendHttpRequest($getdata, 'GET'); |
| 437 |
|
} |
| 438 |
|
|
| 439 |
|
/** |
| 440 |
|
* Uses VTiger queries to retrieve the entity matching a list of constraints |
|
@@ 571-586 (lines=16) @@
|
| 568 |
|
* @param string $entityID The ID of the entity to delete |
| 569 |
|
* @return array Removal status object |
| 570 |
|
*/ |
| 571 |
|
public function entityDelete($moduleName, $entityID) |
| 572 |
|
{ |
| 573 |
|
// Perform re-login if required. |
| 574 |
|
$this->checkLogin(); |
| 575 |
|
|
| 576 |
|
// Preprend so-called moduleid if needed |
| 577 |
|
$entityID = $this->getTypedID($moduleName, $entityID); |
| 578 |
|
|
| 579 |
|
$postdata = [ |
| 580 |
|
'operation' => 'delete', |
| 581 |
|
'sessionName' => $this->sessionName, |
| 582 |
|
'id' => $entityID |
| 583 |
|
]; |
| 584 |
|
|
| 585 |
|
return $this->sendHttpRequest($postdata); |
| 586 |
|
} |
| 587 |
|
|
| 588 |
|
/** |
| 589 |
|
* Retrieves multiple records using module name and a set of constraints |