Skip to content

flochtililoch/DrupalBundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drupal Bundle

Introduction

Provides Drupal API within your Symfony2 project.

Requirements

Installation

Download FlochDrupalBundle and add Drupal 6.22 to your vendors

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 install

Using 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.22

Configure the Autoloader

Add the Floch namespace to your autoloader:

<?php
// app/autoload.php

$loader->registerNamespaces(array(
    // ...
    'Floch' => __DIR__.'/../vendor/bundles',
));

Enable the bundle

Finally, enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Floch\DrupalBundle\FlochDrupalBundle(),
    );
}

Configure your Drupal installation

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 default routes to your routing file

Add the following lines to your routing.yml file:

  FlochDrupalBundle:
      resource: "@FlochDrupalBundle/Resources/config/routing.yml"

About

Symfony2 bundle providing access to Drupal API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages