sokil / promo-bundle
此包已被废弃且不再维护。没有建议的替代包。
促销
0.1.2
2017-04-17 16:00 UTC
Requires
- php: ^5.5 || ^7.0
Requires (Dev)
- doctrine/orm: ^2.0
- phpunit/phpunit: >=3.7.38 <6.0
- satooshi/php-coveralls: >=0.7.1 <2.0
- sensio/framework-extra-bundle: ~2.3|^3.0
- squizlabs/php_codesniffer: ^2.3
- symfony/framework-bundle: ~2.3|~3.0
- symfony/templating: ~2.3|^3.0
This package is auto-updated.
Last update: 2023-03-27 22:50:42 UTC
README
安装
添加 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_orm
或 blackhole
。
promo: tracking: engine: doctrine_orm # engine to store tracking data