Skip to content

radmar/FrequenceWebCalendRBundle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FrequenceWebCalendRBundle

This bundle provides CalendR integration.

It allows you to manage calendar and events.

Calendar generation

Controller:

/**
 * @Template()
 */
public function indexAction()
{
    return array('month' => $this->get('calendr')->getMonth(2012, 01));
}

Template

<table>

    {% for week in month %}
        <tr>
            {% for day in week %}
                <td>
                    {% if month.contains(day) %}
                        {{ day.begin.format('d') }}
                    {% else %}
                        &nbsp;
                    {% endif %}
                </td>
            {% endfor %>
        </tr>
    {% endfor %}

</table>

Event management

Providers

To manage your events, you have to create a provider and an event class. See CalendR doc

Declare your provider

This bundle allows you to easily add your providers to the CalendR event manager. Your provider have to be a service.

#config.yml

services:
    my_event_provider:
        class: Your\Bundle\Event\Provider
        tags:
            - { name: calendr.event_provider }

About

Symfony2 integration for CalendR PHP library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published