edofre/yii2-fullcalendar-scheduler
Composer 安装命令:
composer require edofre/yii2-fullcalendar-scheduler
包简介
Yii2 widget for fullcalendar scheduler module
README 文档
README
Installation
The preferred way to install this extension is through composer.
To install, either run
$ php composer.phar require edofre/yii2-fullcalendar-scheduler "V1.1.12"
or add
"edofre/yii2-fullcalendar-scheduler": "V1.1.12"
to the require section of your composer.json file.
Usage
See the demos/ folder for all the examples.
Simple usage with array data
<?= \edofre\fullcalendarscheduler\FullcalendarScheduler::widget([ 'header' => [ 'left' => 'today prev,next', 'center' => 'title', 'right' => 'timelineDay,timelineThreeDays,agendaWeek,month', ], 'clientOptions' => [ 'now' => '2016-05-07', 'editable' => true, // enable draggable events 'aspectRatio' => 1.8, 'scrollTime' => '00:00', // undo default 6am scrollTime 'defaultView' => 'timelineDay', 'views' => [ 'timelineThreeDays' => [ 'type' => 'timeline', 'duration' => [ 'days' => 3, ], ], ], 'resourceLabelText' => 'Rooms', 'resources' => [ ['id' => 'a', 'title' => 'Auditorium A'], ['id' => 'b', 'title' => 'Auditorium B', 'eventColor' => 'green'], ['id' => 'c', 'title' => 'Auditorium C', 'eventColor' => 'orange'], [ 'id' => 'd', 'title' => 'Auditorium D', 'children' => [ ['id' => 'd1', 'title' => 'Room D1'], ['id' => 'd2', 'title' => 'Room D2'], ], ], ['id' => 'e', 'title' => 'Auditorium E'], ['id' => 'f', 'title' => 'Auditorium F', 'eventColor' => 'red'], ['id' => 'g', 'title' => 'Auditorium G'], ['id' => 'h', 'title' => 'Auditorium H'], ['id' => 'i', 'title' => 'Auditorium I'], ['id' => 'j', 'title' => 'Auditorium J'], ['id' => 'k', 'title' => 'Auditorium K'], ['id' => 'l', 'title' => 'Auditorium L'], ['id' => 'm', 'title' => 'Auditorium M'], ['id' => 'n', 'title' => 'Auditorium N'], ['id' => 'o', 'title' => 'Auditorium O'], ['id' => 'p', 'title' => 'Auditorium P'], ['id' => 'q', 'title' => 'Auditorium Q'], ['id' => 'r', 'title' => 'Auditorium R'], ['id' => 's', 'title' => 'Auditorium S'], ['id' => 't', 'title' => 'Auditorium T'], ['id' => 'u', 'title' => 'Auditorium U'], ['id' => 'v', 'title' => 'Auditorium V'], ['id' => 'w', 'title' => 'Auditorium W'], ['id' => 'x', 'title' => 'Auditorium X'], ['id' => 'y', 'title' => 'Auditorium Y'], ['id' => 'z', 'title' => 'Auditorium Z'], ], 'events' => [ ['id' => '1', 'resourceId' => 'b', 'start' => '2016-05-07T02:00:00', 'end' => '2016-05-07T07:00:00', 'title' => 'event 1'], ['id' => '2', 'resourceId' => 'c', 'start' => '2016-05-07T05:00:00', 'end' => '2016-05-07T22:00:00', 'title' => 'event 2'], ['id' => '3', 'resourceId' => 'd', 'start' => '2016-05-06', 'end' => '2016-05-08', 'title' => 'event 3'], ['id' => '4', 'resourceId' => 'e', 'start' => '2016-05-07T03:00:00', 'end' => '2016-05-07T08:00:00', 'title' => 'event 4'], ['id' => '5', 'resourceId' => 'f', 'start' => '2016-05-07T00:30:00', 'end' => '2016-05-07T02:30:00', 'title' => 'event 5'], ], ], ]); ?>
Simple use with JSON data from controller actions
<?= \edofre\fullcalendarscheduler\FullcalendarScheduler::widget([ 'header' => [ 'left' => 'today prev,next', 'center' => 'title', 'right' => 'timelineDay,timelineThreeDays,agendaWeek,month', ], 'clientOptions' => [ 'now' => '2016-05-07', 'editable' => true, // enable draggable events 'aspectRatio' => 1.8, 'scrollTime' => '00:00', // undo default 6am scrollTime 'defaultView' => 'timelineDay', 'views' => [ 'timelineThreeDays' => [ 'type' => 'timeline', 'duration' => ['days' => 3], ], ], 'resourceLabelText' => 'Rooms', 'resources' => \yii\helpers\Url::to(['scheduler/resources', 'id' => 1]), 'events' => \yii\helpers\Url::to(['scheduler/events', 'id' => 2]), ], ]); ?>
Controller actions (Controller is also included in the demos/json/ directory)
/** * @param $id * @return array */ public function actionResources($id) { \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; return [ new Resource(["id" => "a", "title" => "Auditorium A"]), new Resource(["id" => "b", "title" => "Auditorium B", "eventColor" => "green"]), new Resource(["id" => "c", "title" => "Auditorium C", "eventColor" => "orange"]), new Resource([ "id" => "d", "title" => "Auditorium D", "children" => [ new Resource(["id" => "d1", "title" => "Room D1"]), new Resource(["id" => "d2", "title" => "Room D2"]), ], ]), new Resource(["id" => "e", "title" => "Auditorium E"]), new Resource(["id" => "f", "title" => "Auditorium F", "eventColor" => "red"]), new Resource(["id" => "g", "title" => "Auditorium G"]), new Resource(["id" => "h", "title" => "Auditorium H"]), new Resource(["id" => "i", "title" => "Auditorium I"]), new Resource(["id" => "j", "title" => "Auditorium J"]), new Resource(["id" => "k", "title" => "Auditorium K"]), new Resource(["id" => "l", "title" => "Auditorium L"]), new Resource(["id" => "m", "title" => "Auditorium M"]), new Resource(["id" => "n", "title" => "Auditorium N"]), new Resource(["id" => "o", "title" => "Auditorium O"]), new Resource(["id" => "p", "title" => "Auditorium P"]), new Resource(["id" => "q", "title" => "Auditorium Q"]), new Resource(["id" => "r", "title" => "Auditorium R"]), new Resource(["id" => "s", "title" => "Auditorium S"]), new Resource(["id" => "t", "title" => "Auditorium T"]), new Resource(["id" => "u", "title" => "Auditorium U"]), new Resource(["id" => "v", "title" => "Auditorium V"]), new Resource(["id" => "w", "title" => "Auditorium W"]), new Resource(["id" => "x", "title" => "Auditorium X"]), new Resource(["id" => "y", "title" => "Auditorium Y"]), new Resource(["id" => "z", "title" => "Auditorium Z"]), ]; } /** * @param $id * @param $start * @param $end * @return array */ public function actionEvents($id, $start, $end) { \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; return [ new Event(["id" => "1", "resourceId" => "b", "start" => "2016-05-07T02:00:00", "end" => "2016-05-07T07:00:00", "title" => "event 1"]), new Event(["id" => "2", "resourceId" => "c", "start" => "2016-05-07T05:00:00", "end" => "2016-05-07T22:00:00", "title" => "event 2"]), new Event(["id" => "3", "resourceId" => "d", "start" => "2016-05-06", "end" => "2016-05-08", "title" => "event 3"]), new Event(["id" => "4", "resourceId" => "e", "start" => "2016-05-07T03:00:00", "end" => "2016-05-07T08:00:00", "title" => "event 4"]), new Event(["id" => "5", "resourceId" => "f", "start" => "2016-05-07T00:30:00", "end" => "2016-05-07T02:30:00", "title" => "event 5"]), ]; }
edofre/yii2-fullcalendar-scheduler 适用场景与选型建议
edofre/yii2-fullcalendar-scheduler 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 37.86k 次下载、GitHub Stars 达 24, 最近一次更新时间为 2016 年 05 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「javascript」 「event」 「calendar」 「scheduler」 「fullcalendar-scheduler」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 edofre/yii2-fullcalendar-scheduler 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 edofre/yii2-fullcalendar-scheduler 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 edofre/yii2-fullcalendar-scheduler 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Generates a Blade directive exporting all of your named Laravel routes. Also provides a nice route() helper function in JavaScript.
Caching and compression for Twig assets (JavaScript and CSS).
A pretty nice way to expose your translation messages to your JavaScript.
A modern PHP library for generating iCalendar v2.0 events
A powerful event calendar Tool for Laravel's Nova 5.
Check for holidays - localeaware
统计信息
- 总下载量: 37.86k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 24
- 点击次数: 32
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-05-31