2017 © Pedro Peláez
 

symfony-bundle promo-bundle

Promo

image

sokil/promo-bundle

Promo

  • Friday, May 26, 2017
  • by sokil
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Promo Bundle

Latest Stable Version Total Downloads, (*1)

Installation

Add composer dependency:, (*2)

composer.phar require sokil/promo-bundle

Add bundle to your AppKernel:, (*3)

<?php

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            new Sokil\PromoBundle\PromoBundle(),
        );
    }
}

Configure routes in app/config/routing.yml:, (*4)

# show landing page
landing_index:
  path: /
  defaults:
    _controller: PromoBundle:Landing:index
  methods:  [GET]

# track exit and redirect to external url
landing_away:
  path: /away
  defaults:
    _controller: PromoBundle:Landing:away
  methods:  [GET]

Away action

Away action used to redirect to some url from promo page., (*5)

First add configuration to bundle:, (*6)

promo:
  away:
    allowed: true # allow redirect to external urls
    domainWhiteList: # if specified, allow redirect only to specified domains
      - http://example.com
    track: true # allow track of away campainn (default: false)

Tracking

Engine may be doctrine_orm or blackhole., (*7)

promo:
  tracking:
    engine: doctrine_orm # engine to store tracking data

The Versions