https://github.com/gkite13/vtiger-api-bundle
Symfony bandle for VtigerCrm webservice api
https://github.com/gkite13/vtiger-api-bundle
api php symfony-bundle vtigercrm
Last synced: 3 months ago
JSON representation
Symfony bandle for VtigerCrm webservice api
- Host: GitHub
- URL: https://github.com/gkite13/vtiger-api-bundle
- Owner: gKite13
- License: mit
- Created: 2022-01-13T07:12:10.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-14T06:05:36.000Z (over 3 years ago)
- Last Synced: 2025-02-07T18:16:12.925Z (4 months ago)
- Topics: api, php, symfony-bundle, vtigercrm
- Language: PHP
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VtigerApiBundle
## Installation
``` bash
$ composer require gkite13/vtiger-api-bundle
```## Configuration
``` yaml
# 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
```yaml
# config/packages/cache
pools:
# ...
my_cache_pool:
adapter: cache.adapter.filesystem
```
```yaml
# config/packages/gkite13_vtiger_api.yaml
gkite13_vtiger_api:
# ...
cache:
pool: my_cache_pool
```## Usage
### Query
``` php
$queryString = "SELECT * FROM ModuleName";
$result = $this->vtigerApi->query($queryString);
```### Retrieve
To retrieve a record, you need a vtiger_ws_entity id and entityId.
``` php
$leadId = "10x12345";
$result = $this->vtigerApi->retrieve($leadId);
```### Create
``` php
$lead = new \stdClass();
$lead->property1 = 'test';
$lead->property2 = 12345;
$result = $this->vtigerApi->create('EntityType', $lead);
```### Update
``` php
$leadId = "10x12345";
$lead = $this->vtigerApi->retrieve($leadId);
$lead->property1 = 'test2';
$lead->property2 = 123;
$result = $this->vtigerApi->update($lead);
```### Delete
``` php
$leadId = "10x12345";
$result = $this->vtigerApi->delete($leadId);
```