mfcc-noodle
NOTE: This is still under heavy-development. Use at your own risk., (*1)
Easy to use, easy to implement, superflexibile and modular Content Management system base on Zend Framework 2 and Twitter Bootstrap., (*2)
Famous 9 step installation to create new website with admin
- 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
to config/autoload
and setup
- Setup you doctrine connection driver if not present
- Copy
cli-config.php
from vendor/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
How to create your own module:
- Create you own entity in
Noodle\Entity\Tables
- Create corresponding table for your entity.
- Add your entity to modules table
Bundled datatypes and options
TBS, (*3)
How to create your own datatype:
- Create your own form element base on one of Zend Form Elements
- Implement
prepare()
, treatValueBeforeSave()
and getListedValue()
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;
How to create your own custom module:
Noodle is prepared for vendor modules. Just listen for this event:, (*4)
$events->getSharedManager()->attach('Noodle\Service\ModulesService', 'vendorModules.load', function ($e) {
$e->getTarget()->addVendorModule('your_module_service');
});
Vendor module must implement TODO
., (*5)
Attach view helper to shared event manager event, (*6)
$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., (*7)
NOTE: Please be carefull if you use your own option settings so there will be no conflicts in namespaces., (*8)
In you helper:, (*9)
$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, (*10)
Please see Noodle\View\Helper\Dashboard\GoogleAnalytics
as a reference., (*11)
Option settings
You can set and get noodle options settings wherever you want using:, (*12)
$optionService = $this->getServiceLocator()->getServiceLocator()->get('noodleOptions');
$optionService->setOption('some_widget_namespace.some_option_key', option_value);
$optionService->getOption('some_option_key');
TODOS
- 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