NOTE: This is still under heavy-development. Use at your own risk.
Easy to use, easy to implement, superflexibile and modular Content Management system base on Zend Framework 2 and Twitter Bootstrap.
- Install Zend Skeleton App (optional)
- Require mfcc-noodle in composer
"mfcc/noodle": "dev-master"
- There is no step 3
- Copy config.dist files from
vendor/mfcc/noodle/config
toconfig/autoload
and setup - Setup you doctrine connection driver if not present
- Copy
cli-config.php
fromvendor/mfcc/noodle
to project root - Run
php vendor/doctrine/orm/bin/doctrine orm:schema-tool:update --force
to create db - Set default admin user
- Create your entities and run
php vendor/doctrine/orm/bin/doctrine orm:schema-tool:update --force
after every update
- Create you own entity in
Noodle\Entity\Tables
- Create corresponding table for your entity.
- Add your entity to modules table
TBS
- Create your own form element base on one of Zend Form Elements
- Implement
prepare()
,treatValueBeforeSave()
andgetListedValue()
if needed. - Use data type in your entity like that:
/**
* @ORM\Column(type="string");
* @Annotation\Type("Your\Datatype\Namespace")
* @Annotation\Options({"label":"Your label"})
* @Annotation\Required(true)
*/
public $title;
Noodle is prepared for vendor modules. Just listen for this event:
$events->getSharedManager()->attach('Noodle\Service\ModulesService', 'vendorModules.load', function ($e) {
$e->getTarget()->addVendorModule('your_module_service');
});
Vendor module must implement TODO
.
Attach view helper to shared event manager event
$events->getSharedManager()->attach('Noodle\Controller\IndexController', 'dashboard', function ($e) {
$e->getTarget()->addDashboardModule('some_helper_service');
});
Use and save noodle options for your widget if needed.
NOTE: Please be carefull if you use your own option settings so there will be no conflicts in namespaces.
In you helper:
$optionService = $this->getServiceLocator()->getServiceLocator()->get('noodleOptions');
$optionService->setOption('your_widget_namespace.your_option_key', option_value);
$optionService->getOption('your_widget_namespace.your_option_key');
Widget will be rendered via your helper public function __invoke(){}
method
Please see Noodle\View\Helper\Dashboard\GoogleAnalytics
as a reference.
You can set and get noodle options settings wherever you want using:
$optionService = $this->getServiceLocator()->getServiceLocator()->get('noodleOptions');
$optionService->setOption('some_widget_namespace.some_option_key', option_value);
$optionService->getOption('some_option_key');
- Create tables automatically from entities
- Manage tables in gui
- Clean code and provide interfaces
- Add user role management
- Set absolute namespace path for Noodle\Entity\Tables and set base table to extend from