sokil/promo-bundle

此包已被废弃且不再维护。没有建议的替代包。

促销

安装: 12

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放问题: 1

类型:symfony-bundle

0.1.2 2017-04-17 16:00 UTC

This package is auto-updated.

Last update: 2023-03-27 22:50:42 UTC


README

Latest Stable Version Total Downloads

安装

添加 composer 依赖

composer.phar require sokil/promo-bundle

将包添加到你的 AppKernel

<?php

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

app/config/routing.yml 中配置路由

# 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]

离开动作

离开动作用于从促销页面重定向到某些 URL。

首先添加配置到包中

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)

跟踪

引擎可能是 doctrine_ormblackhole

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