Beispiel #1
0
 public function setParameters(ContainerBuilder $container, $config)
 {
     $configStrings = VariableUtil::arrayConcatenate($config);
     foreach ($configStrings as $name => $node) {
         $container->setParameter($this->getAlias() . '.' . $name, $node);
     }
 }
Beispiel #2
0
 public function process(ContainerBuilder $container)
 {
     if (!$container->hasParameter('twig.form.resources')) {
         return;
     }
     /*
      * Avoid that Avanzu overrides the Braincrafted form widgets.
      */
     $param = $container->getParameter('twig.form.resources');
     $param = VariableUtil::unsetInNumericArrayByValue($param, 'AvanzuAdminThemeBundle:layout:form-theme.html.twig');
     $container->setParameter('twig.form.resources', $param);
 }
 /**
 * List all URLs of all connected Locations in all Channels.
 *
 * Example Request
 * ===============
 *
 *      GET /api/v1/locations/urls
 *
 * Example Response
 * ================
 *
     {
    "1": "http://wordpress.amariki.com",
    "2": "http://www.slideshare.net/amariki_test",
    "3": "https://global.gotowebinar.com/webinars.tmpl",
    "4": "https://twitter.com/AmarikiTest1",
    "5": "https://www.facebook.com/pages/Amariki/1384145015223372",
    "6": "https://www.facebook.com/profile.php?id=100008874400259",
    "7": "https://www.facebook.com/profile.php?id=100008922632416",
    "8": "https://www.linkedin.com/pub/amariki-software/a1/455/616"
     }
 *
 * @ApiDoc(
 *  section="Core"
 * )
 *
 * @REST\GET("/locations/urls")
 *
 * @return \Symfony\Component\HttpFoundation\Response
 */
 public function getLocationsUrlsMetaAction()
 {
     $qb = $this->getQueryBuilder();
     $qb->select('l.url');
     $qb->from('CampaignChain\\CoreBundle\\Entity\\Channel', 'c');
     $qb->from('CampaignChain\\CoreBundle\\Entity\\Location', 'l');
     $qb->where('c.id = l.channel');
     $qb->andWhere('l.operation IS NULL');
     $qb->groupBy('l.url');
     $query = $qb->getQuery();
     $urls = $query->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
     return $this->response(VariableUtil::arrayFlatten($urls));
 }
 /**
 * List all available vendors of installed Composer packages containing CampaignChain Modules.
 *
 * Example Request
 * ===============
 *
 *      GET /api/v1/packages/vendors
 *
 * Example Response
 * ================
     [
    "campaignchain"
     ]
 *
 * @ApiDoc(
 *  section="Core",
 * )
 *
 * @REST\Get("/vendors")
 *
 * @return \Symfony\Component\HttpFoundation\Response
 */
 public function getVendorsMetaAction()
 {
     $qb = $this->getQueryBuilder();
     $qb->select('b.name');
     $qb->from('CampaignChain\\CoreBundle\\Entity\\Bundle', 'b');
     $qb->groupBy('b.name');
     $qb->orderBy('b.name');
     $query = $qb->getQuery();
     $packages = VariableUtil::arrayFlatten($query->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY));
     // Extract just the vendor names from the query result.
     $vendors = array();
     foreach ($packages as $package) {
         $packageParts = explode('/', $package);
         $vendor = $packageParts[0];
         if (!in_array($vendor, $vendors)) {
             array_push($vendors, $vendor);
         }
     }
     return $this->response($vendors);
 }
 /**
 * List all available Module URIs.
 *
 * Example Request
 * ===============
 *
 *      GET /api/v1/modules/uris
 *
 * Example Response
 * ================
 *
     [
    "campaignchain/report-analytics-cta-tracking/campaignchain-analytics-cta-tracking-per-location",
    "campaignchain/location-citrix/campaignchain-citrix-user",
    "campaignchain/channel-facebook/campaignchain-facebook",
    "campaignchain/location-facebook/campaignchain-facebook-page",
    "campaignchain/activity-facebook/campaignchain-facebook-publish-status",
    "campaignchain/operation-facebook/campaignchain-facebook-publish-status",
    "campaignchain/location-facebook/campaignchain-facebook-status",
    "campaignchain/location-facebook/campaignchain-facebook-user",
    "campaignchain/channel-google/campaignchain-google",
    "campaignchain/location-google-analytics/campaignchain-google-analytics",
    "campaignchain/channel-google-analytics/campaignchain-google-analytics",
    "campaignchain/report-google/campaignchain-google-analytics",
    "campaignchain/report-google-analytics/campaignchain-google-analytics",
    "campaignchain/activity-gotowebinar/campaignchain-gotowebinar",
    "campaignchain/channel-citrix/campaignchain-gotowebinar",
    "campaignchain/operation-gotowebinar/campaignchain-gotowebinar",
    "campaignchain/location-citrix/campaignchain-gotowebinar",
    "campaignchain/channel-linkedin/campaignchain-linkedin",
    "campaignchain/activity-linkedin/campaignchain-linkedin-share-news-item",
    "campaignchain/operation-linkedin/campaignchain-linkedin-share-news-item",
    "campaignchain/location-linkedin/campaignchain-linkedin-user",
    "campaignchain/activity-mailchimp/campaignchain-mailchimp",
    "campaignchain/channel-mailchimp/campaignchain-mailchimp",
    "campaignchain/location-mailchimp/campaignchain-mailchimp-newsletter",
    "campaignchain/operation-mailchimp/campaignchain-mailchimp-newsletter",
    "campaignchain/location-mailchimp/campaignchain-mailchimp-user",
    "campaignchain/report-analytics-metrics-per-activity/campaignchain-metrics-per-activity",
    "campaignchain/campaign-repeating/campaignchain-repeating",
    "campaignchain/campaign-scheduled/campaignchain-scheduled",
    "campaignchain/milestone-scheduled/campaignchain-scheduled",
    "campaignchain/security-authentication-client-oauth/campaignchain-security-authentication-client-oauth",
    "campaignchain/security-authentication-server-oauth/campaignchain-security-authentication-server-oauth",
    "campaignchain/activity-slideshare/campaignchain-slideshare",
    "campaignchain/operation-slideshare/campaignchain-slideshare",
    "campaignchain/channel-slideshare/campaignchain-slideshare",
    "campaignchain/location-slideshare/campaignchain-slideshare-user",
    "campaignchain/campaign-template/campaignchain-template",
    "campaignchain/channel-twitter/campaignchain-twitter",
    "campaignchain/location-twitter/campaignchain-twitter-status",
    "campaignchain/activity-twitter/campaignchain-twitter-update-status",
    "campaignchain/operation-twitter/campaignchain-twitter-update-status",
    "campaignchain/location-twitter/campaignchain-twitter-user",
    "campaignchain/location-website/campaignchain-website",
    "campaignchain/channel-website/campaignchain-website",
    "campaignchain/location-citrix/campaignchain-website",
    "campaignchain/location-website/campaignchain-website-page",
    "campaignchain/location-citrix/campaignchain-website-page"
     ]
 *
 * @ApiDoc(
 *  section="Core"
 * )
 *
 * @REST\GET("/uris")
 *
 * @return \Symfony\Component\HttpFoundation\Response
 */
 public function getUrisMetaAction()
 {
     $qb = $this->getQueryBuilder();
     $qb->select("CONCAT(b.name, '/', m.identifier)");
     $qb->from('CampaignChain\\CoreBundle\\Entity\\Module', 'm');
     $qb->from('CampaignChain\\CoreBundle\\Entity\\Bundle', 'b');
     $qb->where('b.id = m.bundle');
     $qb->orderBy('m.identifier');
     $query = $qb->getQuery();
     return $this->response(VariableUtil::arrayFlatten($query->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY)));
 }