PHP code example of intracto / campaign-monitor-bundle
1. Go to this page and download the library: Download intracto/campaign-monitor-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/ */
intracto / campaign-monitor-bundle example snippets
php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
...
new Intracto\CampaignMonitorBundle\IntractoCampaignMonitorBundle(),
);
}
php
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class ClientController extends Controller
{
/**
* @var Request $request
* @return Response
*/
public function subscriberListsAction(Request $request)
{
$clientConnectorFactory = $this->get('itr.campaign_monitor.factory.client_connector');
$clientId = $this->getParameter('your_client_id');
$clientConnector = $clientConnectorFactory->getConnectorForId($clientId);
/** @var ListReference[]|ArrayCollection $lists */
$lists = $clientConnector->getLists();
return $this->render('your_template_file.html.twig', ['lists' => $lists]);
}
...
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.