mamuz / mamuz-content-manager
Provides simple content manager for ZF2 with Doctrine
Requires
- php: >=5.4
- doctrine/doctrine-orm-module: ~0.8
- maglnet/magl-markdown: ~1.3
- zendframework/zend-eventmanager: ~2.3
- zendframework/zend-form: ~2.3
- zendframework/zend-http: ~2.3
- zendframework/zend-modulemanager: ~2.3
- zendframework/zend-mvc: ~2.3
- zendframework/zend-servicemanager: ~2.3
- zendframework/zend-view: ~2.3
Requires (Dev)
- mamuz/php-dependency-analysis: 0.*
- mockery/mockery: 0.9.*
- phpunit/phpunit: 4.*
- satooshi/php-coveralls: 0.6.*
README
Features
- This module provides a CMS based on ZF2 and Doctrine2.
- Pages are persistent in repository and accessable by ZF2 routes.
- Pages are rendered by a markdown parser.
Installation
The recommended way to install
mamuz/mamuz-content-manager
is through
composer by adding dependency to your composer.json
:
{ "require": { "mamuz/mamuz-content-manager": "*" } }
After that run composer update
and enable this module for ZF2 by adding
MamuzContentManager
to the modules
key in ./config/application.config.php
:
// ... 'modules' => array( 'MamuzContentManager', ),
This module is based on DoctrineORMModule
and be sure that you have already configured database connection.
Create database tables with command line tool provided by
DoctrineORMModule
:
./vendor/bin/doctrine-module orm:schema-tool:update
Configuration
This module is usable out of the box, but you can overwrite default configuration by
adding a config file in ./config/autoload
directory.
For default configuration see
module.config.php
Creating a new Page
Create an entity in MamuzPage
repository.
Admin Module to provide an interface for that is planned.
Workflow
In case of successful routing page
parameter is used to find a page entity by path
property.
If found page is flagged as published
, content
will be rendered by a markdown parser and pushed
to the HTTP-Response object as a new view model,
otherwise a 404 HTTP status code will be set to the HTTP-Response object.
Events
For the sake of simplicity Event
is used for
FQN MamuzContentManager\EventManager\Event
.
The following events are triggered by Event::IDENTIFIER
mamuz-content-manager: