Giter VIP home page Giter VIP logo

cmforchestra's Introduction

ORCHESTRA Bundles

Orchestra is not just the description you just read above. It also allows you to create your own CMS. It's a CMF easy to use, build your own template (layout), add your own custom block with your own logic, build all the widget you need. That it what Orcherstra is made for.

Structure of the framework

The bundle has been split into 2 directories :

BootStrap

* AclManagerBundle : A bundle which provides classes to run ACL Manager`s utilities for Symfony2
* AdminBundle : A bundle which overload the SonataAdminBundle
* CacheBundle : A bundle which provides classes to cache handlers (memcache, files)
* DatabaseBundle : A bundle which provides classes and commands to run DB vendor`s utilities to backup and restore databases. 
* FacebookBundle : A bundle which provides a factory of classes allowing to work and develop utilities of facebook API.
* GoogleBundle : A bundle which provides a factory of classes allowing to work and develop utilities of google API.
* MediaBundle : A bundle which overload the SonataMediaBundle.
* TranslationBundle : A bundle which provides models of classes allowing to work and develop with Gedmo translation and Gedmo tree, and a command to
generate orchestra bundle with a CRUD system of an entity
* UserBundle : the current one, contains core libraries and services
* WurflBundle : the current one, contains core libraries and services

PiApp

* AdminBundle : A bundle which construct all the CMF with all managers of the creation of page with blocks and widgets.
* GedmoBundle : A bundle which is used to create a project with the CMF.
* TemplateBundle :  A bundle which is used to stock all template of layout and others.

Dependencies

Register all bundle in your app/AppKernel.php file:

    public function registerBundles()
    {
        $bundles = array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
            new Symfony\Bundle\TwigBundle\TwigBundle(),
        		
            new Symfony\Bundle\MonologBundle\MonologBundle(),
            new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
            new Symfony\Bundle\AsseticBundle\AsseticBundle(),
            new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
        	
        	# secure
       		new JMS\AopBundle\JMSAopBundle(),
       		new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
       		new JMS\DiExtraBundle\JMSDiExtraBundle($this),  
        		
        	# route
        	new BeSimple\I18nRoutingBundle\BeSimpleI18nRoutingBundle(),

        	# doctrine
            new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
        	new Symfony\Bundle\DoctrineFixturesBundle\DoctrineFixturesBundle(),
        	new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
        		
        	# sonata admin
        	new Sonata\AdminBundle\SonataAdminBundle(), //
        	new Sonata\EasyExtendsBundle\SonataEasyExtendsBundle(), //
        	new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(), //
        	new Sonata\CacheBundle\SonataCacheBundle(),
        	new Sonata\BlockBundle\SonataBlockBundle(),
        	new Sonata\MediaBundle\SonataMediaBundle(), //
        
        	# tools
        	new FOS\UserBundle\FOSUserBundle(), // gestion user/groupe
        	new Knp\Bundle\MenuBundle\KnpMenuBundle(), // gestion menu
        	new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(), // gestion pagination        	
        	
        	# boostrap
        	new BootStrap\DatabaseBundle\BootStrapDatabaseBundle(), 
        	new BootStrap\CacheBundle\BootStrapCacheBundle(),
        	new BootStrap\WurflBundle\BootStrapWurflBundle(),
        	new BootStrap\AclManagerBundle\BootStrapAclManagerBundle(),
        	new BootStrap\AdminBundle\BootStrapAdminBundle(),
        	new BootStrap\UserBundle\BootStrapUserBundle(),
        	new BootStrap\TranslationBundle\BootStrapTranslationBundle(),
        	new BootStrap\TranslatorBundle\BootStrapTranslatorBundle(),
        	new BootStrap\MediaBundle\BootStrapMediaBundle(),
        	new BootStrap\GoogleBundle\BootStrapGoogleBundle(),
        	new BootStrap\FacebookBundle\BootStrapFacebookBundle(),
        		
        	# trades
        	new PiApp\AdminBundle\PiAppAdminBundle(),
        	new PiApp\GedmoBundle\PiAppGedmoBundle(),
        	new PiApp\TemplateBundle\PiAppTemplateBundle(),
        );

autoload.php

Register all namespace before using the bundle. Add the following line to your app/autoload.php

    $loader->registerNamespaces(array(
		'Symfony'          => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
		'Sensio'           => __DIR__.'/../vendor/bundles',
		
		// JMS
		'JMS'              => __DIR__.'/../vendor/bundles',
		
		// generate code library
		'CG'               => __DIR__.'/../vendor/cg-library/src',
		
		// doctrine extension
		'Doctrine\\Common\\DataFixtures'	=> __DIR__.'/../vendor/doctrine-fixtures/lib',
		'Doctrine\\Common' 					=> __DIR__.'/../vendor/doctrine-common/lib',
		'Doctrine\\DBAL\\Migrations'        => __DIR__.'/../vendor/doctrine-migrations/lib',
		'Doctrine\\DBAL'   					=> __DIR__.'/../vendor/doctrine-dbal/lib',
		'Doctrine'         					=> __DIR__.'/../vendor/doctrine/lib',
		'Stof'             					=> __DIR__.'/../vendor/bundles',
		'Gedmo'            					=> __DIR__.'/../vendor/gedmo-doctrine-extensions/library/lib',
		
		'Monolog'          => __DIR__.'/../vendor/monolog/src',
		'Assetic'          => __DIR__.'/../vendor/assetic/src',
		'Metadata'         => __DIR__.'/../vendor/metadata/src',
		
		// BUNDLES
		'FOS' 			   => __DIR__.'/../vendor/bundles',
		'Genemu'		   => __DIR__.'/../vendor/bundles',
		'Exporter'   	   => __DIR__.'/../vendor/exporter/lib',
		'Sonata'		   => __DIR__.'/../vendor/bundles',  // dependency :  Knp\Bundle and Knp\Menu
		'BeSimple'		   => __DIR__.'/../vendor/bundles', // Route - WSDL
		
		
		'Knp\\Bundle'	   => __DIR__.'/../vendor/bundles',
		'Knp\\Menu'   	   => __DIR__.'/../vendor/Knp-menu/src',
		'Knp\\Component'   => __DIR__.'/../vendor/knp-components/src',
		
		'Imagine'		   => __DIR__.'/../vendor/imagine/lib', // dependency : sonata Media
		'Gaufrette'        => __DIR__.'/../vendor/gaufrette/src', // dependency : sonata Media
		'Buzz'             => __DIR__.'/../vendor/buzz/lib', // dependency : sonata Media
		
		// ORCHESTRA BUNDLES
		'BootStrap'  	  	=> __DIR__.'/../src/Orchestra',
		'PiApp'    			=> __DIR__.'/../src/Orchestra',
				
));

Installation

Step 0: Configuring Serveur

Required :

  • PHP with at least version 5.3.2 of PHP

  • Sqlite3 must be enabled

  • JSON must be enabled

  • Ctype must be enabled

  • PHP-XML module must be installed

  • Installtion the gd library (for images): apt-get install php5-gd [command linux]

  • PHP.ini must have the extensions:

    • date.timezone
    • php_fileinfo.dll
    • PDO_SQLITE.dll
    • php_intl.dll
    • php_memcache.dll
    • php_curl.dll

Doctrine :

To use Doctrine, you will need to have installed PDO. And you must have installed the PDO driver for the database server you want to use.

Step 1: Configuring parameters BDD and mailer

  • Open the file orchestra_project / app / config / parameters.ini.
  • Give the name "mydatabase" for example in the database and choose the type pdo_mysql to use a MySQL database.
  • Give your user and password of your Gmail count.
  • Change the secret code that will be used to protect your application from XSS attacks.
[parameters]
    database_driver="pdo_mysql"
    database_host="localhost"
    database_port=""
    database_name="mydatabase"
    database_user="root"
    database_password=""
    mailer_transport="gmail"
    mailer_host=""
    mailer_user="MyUserGMAIL"
    mailer_password="MyPswGMAIL"
    locale="en_GB"
    secret="5b5a0ff57bd45284dafe7f104fc7d8e15"

Step 2: Setting up Permissions

  • The directories app / cache app / logs should be writable by both the web server and the user.
  • On a UNIX system, if your web server is different from your user, you can run the following commands once in your project to ensure that the permissions are correctly installed.
  • We must change www-data on your web server.

Many systems allow you to use ACL chmod a + :

rm -rf app/cache/Backup*
rm -rf app/cache/Indexation*
rm -rf app/cache/media*
rm -rf app/logs/*
rm -rf BootStrap/TranslatorBundle/Resources/translations*

sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs

For more information : http://symfony.com/doc/current/book/installation.html

Then you must add the uploads/media folder to allow specific users to load :

mkdir web/uploads
mkdir web/uploads/media
chmod –R 0777 web/uploads

mkdir web/yui
chmod –R 0777 web/yui

Step 3: Create database, tables and fixtures

  • There's no way to configure these defaults inside Doctrine, as it tries to be as agnostic as possible in terms of environment configuration.
  • One way to solve this problem is to configure server-level defaults.

Setting UTF8 defaults for MySQL is as simple as adding a few lines to your configuration file (typically my.cnf)

	[mysqld]
	collation-server 	 = utf8_general_ci
	character-set-server = utf8

or open file \Doctrine\DBAL\Platforms\AbstractPlatform in getCreateTableSQL method and add this following line

	
	$options = $table->getOptions();
	...
	$options['charset'] = 'utf8';
    $options['collate'] = 'utf8_general_ci';
  • Open your console (cmd) or Putty.
  • Go to the root of the application orchestra_project.

Type the following command to create the database

	php  app/console  doctrine:database:create

Type the following command to create the tables

	php  app/console  doctrine:schema:create

Type the following command to install fixtures of the tables

	php  app/console  doctrine:fixtures:load

For more information : http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html

cmforchestra's People

Contributors

cmforchestra avatar

Stargazers

 avatar

Watchers

 avatar

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.