Skip to content

Latest commit

 

History

History
137 lines (100 loc) · 4.19 KB

install.md

File metadata and controls

137 lines (100 loc) · 4.19 KB

Installing CCDNForum AdminBundle 1.x

Dependencies:

  1. PagerFantaBundle.
  2. CCDNComponent CommonBundle.
  3. CCDNComponent BBCodeBundle.
  4. CCDNComponent CrumbTrailBundle.
  5. CCDNComponent DashboardBundle.
  6. CCDNForum ForumBundle.

Installation:

Installation takes only 4 steps:

  1. Download and install dependencies via Composer.
  2. Register bundles with AppKernel.php.
  3. Update your app/config/routing.yml.
  4. Update your database schema.

Step 1: Download and install dependencies via Composer.

Append the following to end of your applications composer.json file (found in the root of your Symfony2 installation):

// composer.json
{
    // ...
    "require": {
        // ...
        "codeconsortium/ccdn-forum-admin-bundle": "dev-master"
    }
}

NOTE: Please replace dev-master in the snippet above with the latest stable branch, for example 2.0.*.

Then, you can install the new dependencies by running Composer's update command from the directory where your composer.json file is located:

$ php composer.phar update

Step 2: Register bundles with AppKernel.php.

Now, Composer will automatically download all required files, and install them for you. All that is left to do is to update your AppKernel.php file, and register the new bundle:

// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
		new CCDNForum\AdminBundle\CCDNForumAdminBundle(),
		...
	);
}

Step 3: Update your app/config/routing.yml.

In your app/config/routing.yml add:

CCDNForumAdminBundle:
    resource: "@CCDNForumAdminBundle/Resources/config/routing.yml"
    prefix: /

You can change the route of the standalone route to any route you like, it is included for convenience.

Step 4: Update your database schema.

Make sure to add the ForumBundle to doctrines mapping configuration:

# app/config/config.yml
# Doctrine Configuration
doctrine:
    orm:
        default_entity_manager: default
        auto_generate_proxy_classes: "%kernel.debug%"
        resolve_target_entities:
            Symfony\Component\Security\Core\User\UserInterface: FOS\UserBundle\Entity\User
        entity_managers:
            default:
                mappings:
                    FOSUserBundle: ~
                    CCDNForumForumBundle:
                        mapping:              true
                        type:                 yml
                        dir:                  "Resources/config/doctrine"
                        alias:                ~
                        prefix:               CCDNForum\ForumBundle\Entity
                        is_bundle:            true
                    CCDNForumAdminBundle: ~

FOSUserBundle is noted as an additional example, you can add multiple bundles here. You should however choose a UserBundle of your own and change the user entity that UserInterface will resolve to.

From your projects root Symfony directory on the command line run:

$ php app/console doctrine:schema:update --dump-sql

Take the SQL that is output and update your database manually.

Warning:

Please take care when updating your database, check the output SQL before applying it.

Translations

If you wish to use default texts provided in this bundle, you have to make sure you have translator enabled in your config.

# app/config/config.yml

framework:
    translator: ~

Next Steps.

Change the layout template you wish to use for each page by changing the configs under the labelled section 'layout_templates'.

Installation should now be complete!

If you need further help/support, have suggestions or want to contribute please join the community at Code Consortium