Todo list : Simple task management
Warning
This has NEVER been tested ! This bundle IS NOT yet ready to use. Please use [TodoBundle-sandbox] (https://github.com/green-frog/TodoBundle-sandbox) wich is ready to use
- [FOSUserBundle] (https://github.com/FriendsOfSymfony/FOSUserBundle)
- Cause we'll do it later :
- You can pass trougth Step 4 : Configure User class
- And step 6 Configure in
app/config.yml
- [FOSJsRoutingBundle] (https://github.com/FriendsOfSymfony/FOSJsRoutingBundle)
- Optional : Doctrine fixtures
After installing requirements, just follow thoose steps
- Download GreenFrogTodoBundle (by deps or using submodule)
- Configure autoload and enable bundle
- Extends FOSUser User class and ovverride global FOSUSerBundle template
- Configure GreenFrogTodoBundle
- Update database
- Publish assets
- Optional : load fixtures
Using the standard Symfony 2 method with vendors, add the following lines in your deps file:
[GreenFrogTodoBundle]
git=git://github.com/green-frog/TodoBundle.git
target=bundles/GreenFrog/Bundle/TodoBundleAnd now, download it:
$ php bin/vendors installAutload
<?php
// app/autoload.php
$loader->registerNamespaces(array(
// ...
'GreenFrog' => __DIR__.'/../vendor/bundles',
));Then enable
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new GreenFrog\Bundle\TodoBundle\GreenFrogTodoBundle(),
);
}If you skipped step 6 and/or step 4 of FOSUser configuration :
# app/config/config.yml
fos_user:
db_driver: orm
firewall_name: main
user_class: GreenFrog\Bundle\TodoBundle\Entity\UserIf you use twig :
{# app/Ressources/FOSUserBundle/views/layout.html.twig #}
{% extends 'GreenFrogTodoBundle::layout.html.twig' %}
{% block title %}
Secured area - Todo App
{% endblock %}
{% block body %}
{% endblock %}Add routing
# app/config/routing.yml
GreenFrogTodoBundle:
resource: "@GreenFrogTodoBundle/Controller/"
type: annotationConfigure firewall to make app only available by logged in users
# app/config/security.yml
security:
access_control:
- { path: ^/.*$, role: ROLE_USER }
$ php app/console doctrine:schema:update --forcephp app/console assets:install web/ --symlink
php app/console assetic:dumpphp app/console doctrine:fixtures:loadUpcoming MIT
Hope you'll enjoy