Giter Club home page Giter Club logo

nitrathemebundle's Introduction

Getting Started With NitraThemeBundle

Prerequisites

This version of the bundle requires Symfony 2.1. If you are using Symfony 2.0.x, please use the 2.0 branch of the bundle.

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: ~

For more information about translations, check Symfony documentation.

Installation

Installation is a 3 step process:

  1. Download NitraThemeBundle using composer
  2. Enable the Bundle
  3. Configure the NitraThemeBundle

Step 1: Download NitraThemeBundle using composer

Add NitraThemeBundle in your composer.json:

{
    "require": {
        "nitra/nitra-theme-bundle": "dev-master"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update nitra/nitra-theme-bundle

Composer will install the bundle to your project's vendor/nl directory.

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Knp\Bundle\MenuBundle\KnpMenuBundle(),
        new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
        new Admingenerator\GeneratorBundle\AdmingeneratorGeneratorBundle(),
        new Millwright\MenuBundle\MillwrightMenuBundle(),
		new Millwright\ConfigurationBundle\MillwrightConfigurationBundle(),
		new FOS\UserBundle\FOSUserBundle(),
        new Nitra\NitraThemeBundle\NitraThemeBundle(),
    );
}

Step 3: Configure the NitraThemeBundle

Add the following configuration to your config.yml file according to which type of datastore you are using.

# app/config/config.yml
imports:
    - { resource: menu.yml }
    - { resource: ../../vendor/knplabs/doctrine-behaviors/config/orm-services.yml }

# Twig Configuration
twig:
    debug:            %kernel.debug%
    strict_variables: %kernel.debug%
    form:
        resources:
            - 'NitraThemeBundle:Form:fields.html.twig'


# Assetic Configuration
assetic:
    debug:          %kernel.debug%
    use_controller: false
    #bundles:        [ ]
    #java: /usr/bin/java
    filters:
        cssrewrite: ~
        lessphp: ~

# Doctrine Configuration
doctrine:
    orm:
        filters:
            softdeleteable:
                class: Nitra\NitraThemeBundle\Filter\SoftDeleteableFilter
                enabled: true

# FOS Configuration
fos_user:
    db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
    firewall_name: main
    user_class: Nitra\NitraThemeBundle\Entity\User
	
# Admingenerator Configuration
admingenerator_generator:
    base_admin_template: ::base_admin.html.twig
    use_doctrine_orm: true
    stylesheets: []
    twig:
        use_localized_date: true
        date_format: 'Y-M-d'
        localized_date_format: 'full'
        localized_datetime_format: 'medium'
        datetime_format: 'Y-m-d H:i'  
        number_format:
            decimal: 2
            decimal_point: ','
            thousand_separator: ' '
			
# Add blameable listener
parameters:
    knp.doctrine_behaviors.blameable_listener.user_entity: Nitra\NitraThemeBundle\Entity\User			

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.