East Website

Create PHP Website following the #East programming philosophy.


Package, to use with East Foundation, to implement a basic CMS able to mange page with several types of pages (and layout, categories (menus), images and user/author.

This package is also built on MongoDb (and Doctrine ODM) to persist all contents into a MongoDB database, but it can be configured to use other system.

The Frontend is framework free, and can be easily integrated with any framework. An administration panel is provided on Symfony 3.4+.

A default integration to Symfony is available.

This website is built on this package with Symfony 3.4.

...

Features


MongoDb

All dynamics contents are stored into a MongoDb.

sf

Symfony 3.4

Usable with Symfony 3.4+.

PSR-11

Interoperable with any framework implementing the PSR-11 recommendation.

Extendable

Thanks to Recipe, can be extendable only via the DI's configuration.

GitHub


Fork the project on GitHub

It is open source! It's hosted, developed, and maintained on GitHub by folks like you.


View GitHub Project

Example



<?php

//With Symfony, in the AppKernel:

use DI\Bridge\Symfony\Kernel;
use 
DI\ContainerBuilder as DIContainerBuilder;
use 
Doctrine\Common\Persistence\ObjectManager;

class 
AppKernel extends Kernel
{
    public function 
registerBundles()
    {
        
$bundles = [
            
//..
            
new Teknoo\East\FoundationBundle\EastFoundationBundle(),
            new 
Teknoo\East\WebsiteBundle\TeknooEastWebsiteBundle(),
        ];

        
//..

        
return $bundles;
    }

    protected function 
buildPHPDIContainer(DIContainerBuilder $builder)
    {
        
// Configure your container here
        
$vendorPath dirname(__DIR__).'/vendor';
        
$builder->addDefinitions($vendorPath.'/teknoo/east-foundation/src/universal/di.php');
        
$builder->addDefinitions($vendorPath.'/teknoo/east-foundation/src/symfony/Resources/config/di.php');
        
$builder->addDefinitions($vendorPath.'/teknoo/east-website/src/universal/di.php');
        
$builder->addDefinitions([
            
ObjectManager::class => \DI\get('doctrine_mongodb.odm.default_document_manager')
        ]);

        return 
$builder->build();
    }
}

//In app/config.yml
doctrine_mongodb:
  
document_managers:
    default:
      
auto_mappingtrue
      mappings
:
        
TeknooEastWebsite:
          
type'yml'
          
dir'%kernel.root_dir%/../vendor/teknoo/east-website/src/universal/config/doctrine'
          
is_bundlefalse
          prefix
'Teknoo\East\Website\Object'

//In app/security.yml
security:
  
//..
  
providers:
    
main:
      
id'teknoo.east.website.bundle.user_provider'

//In app/routing.yml
website:
  
resource'@TeknooEastWebsiteBundle/Resources/config/routing.yml'