Provides Drupal API within your Symfony2 project.
- Drupal 6.22 (not tested with later versions)
Here are two different method to achieve this:
Using the vendors script
Add the following lines in your deps file:
[FlochDrupalBundle]
git=git://github.com/flochtililoch/DrupalBundle.git
target=bundles/Floch/DrupalBundle
[Drupal]
git=git://github.com/drupal/drupal.git
target=Drupal/Drupal
version=6.22
Now, run the vendors script to download the bundle alongside with Drupal:
$ php bin/vendors installUsing submodules
If you prefer instead to use git submodules, then run the following:
$ git submodule add git://github.com/flochtililoch/DrupalBundle.git vendor/bundles/Floch/DrupalBundle
$ git submodule add git://github.com/drupal/drupal.git vendor/Drupal/Drupal
$ git submodule update --init
$ cd vendor/Drupal/Drupal && git reset --hard 6.22Add the Floch namespace to your autoloader:
<?php
// app/autoload.php
$loader->registerNamespaces(array(
// ...
'Floch' => __DIR__.'/../vendor/bundles',
));Finally, enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Floch\DrupalBundle\FlochDrupalBundle(),
);
}Add the following configuration to your parameters.ini file, replacing values with your settings:
drupal_path = /your/drupal/installation/path
drupal_db_url = mysqli://user@host/dbname
drupal_db_prefix = tablesPrefix_Add the following lines to your routing.yml file:
FlochDrupalBundle:
resource: "@FlochDrupalBundle/Resources/config/routing.yml"