PHP code example of mremi / dolist-bundle

1. Go to this page and download the library: Download mremi/dolist-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mremi / dolist-bundle example snippets




$contactManager = $container->get('mremi_dolist.api.contact_manager');
$fieldManager = $container->get('mremi_dolist.api.field_manager');

$contact = $contactManager->create();
$contact->setEmail('[email protected]');
$contact->addField($fieldManager->create('firstname', 'Firstname'));
$contact->addField($fieldManager->create('lastname', 'Lastname'));

$ticket = $contactManager->save($contact);

$saved = $contactManager->getStatusByTicket($ticket);

if ($saved->isOk()) {
    // contact has been saved...
} else {
    // something is wrong...
    echo sprintf('Returned code: %s, description: %s', $saved->getReturnCode(), $saved->getDescription());
}



use Mremi\Dolist\Contact\GetContactRequest;

$contactManager = $container->get('mremi_dolist.api.contact_manager');

$request = new GetContactRequest;
$request->setOffset(50);
// ...

$contacts = $contactManager->getContacts($request);
 bash
$ php composer.phar update mremi/dolist-bundle
 php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Mremi\DolistBundle\MremiDolistBundle(),
    );
}