frequence-web/calendr-bundle

此包已被弃用且不再维护。作者建议使用yohang/calendr包代替。

此包提供了CalendR库的集成

安装量: 78,491

依赖: 0

建议: 0

安全性: 0

星标: 24

关注者: 4

分支: 9

开放问题: 5

类型:symfony-bundle

1.2.2 2018-03-25 21:27 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:20:40 UTC


README

此包提供CalendR集成。

它允许你管理日历和事件。

日历生成

控制器

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

模板

<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>

事件管理

提供者

要管理你的事件,你必须创建一个提供者和一个事件类。请参阅CalendR文档

声明你的提供者

此包允许你轻松地将你的提供者添加到CalendR事件管理器中。你的提供者必须是一个服务。

#config.yml

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