, (*1)
JaitecClickBundle
- This bundle provides a simply way to control times a page of our project is visited
Installation
Add JaitecClickBundle to your vendor/bundles/ dir
::, (*2)
$ git submodule add https://bitbucket.org/jlaso/jaitecclickbundle.git vendor/bundles/Jaitec/ClickBundle
or add this to deps, (*3)
[JaitecClickBundle]
git=https://bitbucket.org/jlaso/jaitecclickbundle.git
target=/bundles/Jaitec/ClickBundle
and run, (*4)
$ php bin/vendors update
Add the Jaitec namespace to your autoloader
::, (*5)
// app/autoload.php
$loader->registerNamespaces(array(
'Jaitec' => __DIR__.'/../vendor/bundles',
// your other namespaces
);
Add JaitecClickBundle to your application kernel
::, (*6)
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new Jaitec\ClickBundle\JaitecClickBundle(),
// ...
);
}
Usage Sample
::, (*7)
configuration sample
//app/config.yml
#every time a route is visited
jaitec_click:
routes:
# this is a logic name and can be anything
demo:
# this match to logic route (not pattern) defined in routing.yml
route: _demo_hello
# the type in to save at jaitec_click table
entity_type: demo
# this is for no id, the route contains a name or slug
entity_id: ~
entity_name: name
another:
route: _demo
entity_type: demo
# the route not contains any info because is a fixed route
entity_id: 1
entity_name: ~
More info in my spanish site, (*8)
- [developer.joseluislaso.es][1]