gkite13 / vtiger-api-bundle
Installs: 24
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.4
- ext-json: *
- symfony/config: ^5.0
- symfony/dependency-injection: ^5.0
- symfony/http-kernel: ^5.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-10-14 12:23:42 UTC
README
Installation
$ composer require gkite13/vtiger-api-bundle
Configuration
# config/packages/gkite13_vtiger_api.yaml gkite13_vtiger_api: api: site_url: "http://your_crm_url" user: "user_name" access_key: "user_access_key"
For configure cache pool
# config/packages/cache pools: # ... my_cache_pool: adapter: cache.adapter.filesystem
# config/packages/gkite13_vtiger_api.yaml gkite13_vtiger_api: # ... cache: pool: my_cache_pool
Usage
Query
$queryString = "SELECT * FROM ModuleName"; $result = $this->vtigerApi->query($queryString);
Retrieve
To retrieve a record, you need a vtiger_ws_entity id and entityId.
$leadId = "10x12345"; $result = $this->vtigerApi->retrieve($leadId);
Create
$lead = new \stdClass(); $lead->property1 = 'test'; $lead->property2 = 12345; $result = $this->vtigerApi->create('EntityType', $lead);
Update
$leadId = "10x12345"; $lead = $this->vtigerApi->retrieve($leadId); $lead->property1 = 'test2'; $lead->property2 = 123; $result = $this->vtigerApi->update($lead);
Delete
$leadId = "10x12345"; $result = $this->vtigerApi->delete($leadId);