Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require tardigrades/sexy-field-bundle "~1"
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Tardigrades\Bundle\SexyFieldBundle(),
);
// ...
}
// ...
}
1: Add this to your config.yml, this will prevent doctrine migrations to remove the table that will be created in the next step.
doctrine:
dbal:
schema_filter: ~^(?!cache_items)~
2: Then run: bin/console sf:ensure-cache
to create the caching table in the database
3: And add this service to your services.yml . The second argument (true) is used to enable or disable caching. You can make a variable for this.
Tardigrades\SectionField\Service\DefaultCache:
public: false
arguments:
- '@Symfony\Component\Cache\Adapter\TagAwareAdapter'
- true