jaxwifi/yii2-fullcalendar
Composer 安装命令:
composer require jaxwifi/yii2-fullcalendar
包简介
Yii2 fullcalendar Widgets (philippfrenzel fork)
关键字:
README 文档
README
This is fork from philippfrenzel/yii2fullcalendar with some minor asset changes
JQuery Fullcalendar Yii2 Extension
JQuery from: http://arshaw.com/fullcalendar/
Version 4.0.4
License MIT
JQuery Documentation: http://arshaw.com/fullcalendar/docs/ Yii2 Extension by philipp@frenzel.net
A tiny sample can be found here: http://yii2fullcalendar.beeye.org
Installation
Package is although registered at packagist.org - so you can just add one line of code, to let it run!
add the following line to your composer.json require section:
"jaxwifi/yii2-fullcalendar":"*",
or run:
$ php composer.phar require jaxwifi/yii2-fullcalendar "*"
And ensure, that you have the following plugin installed global:
php composer.phar global require "fxp/composer-asset-plugin:~1.0"
Changelog
04-05-2019 Updated to latest 4.0.4 Version with asset dependency fixes
04-05-2019 Updated to latest 4.0.3 Version with asset fixes
17-04-2019 Updated to latest 4.0.2 Stable Version of the library
19-01-2017 Updated to include non-standard fields
29-11-2014 Updated to latest 2.2.3 Version of the library
Usage
Quickstart Looks like this:
$events = array(); //Testing $Event = new \yii2-fullcalendar\models\Event(); $Event->id = 1; $Event->title = 'Testing'; $Event->start = date('Y-m-d\TH:i:s\Z'); $Event->nonstandard = [ 'field1' => 'Something I want to be included in object #1', 'field2' => 'Something I want to be included in object #2', ]; $events[] = $Event; $Event = new \yii2-fullcalendar\models\Event(); $Event->id = 2; $Event->title = 'Testing'; $Event->start = date('Y-m-d\TH:i:s\Z',strtotime('tomorrow 6am')); $events[] = $Event; ?> <?= \yii2-fullcalendar\yii2-fullcalendar::widget(array( 'events'=> $events, ));
Note, that this will only view the events without any detailed view or option to add a new event.. etc.
Non-Standard fields
You can add non-standard fields via the non-standard fields array, for which you can pass any key/value pair, as described in the Event Fields documentation.
So, using the Quick Start example above, you can read field1 and fields2 in your JavaScript using notation similar to event.nonstandard.field1 and event.nonstandard.field2.
AJAX Usage
If you wanna use ajax loader, this could look like this:
20171023 ajaxEvents are replaced by events - pls. check fullcalendar io documentation for details
<?= yii2-fullcalendar\yii2-fullcalendar::widget([ 'options' => [ 'lang' => 'de', //... more options to be defined here! ], 'events' => Url::to(['/timetrack/default/jsoncalendar']) ]); ?>
and inside your referenced controller, the action should look like this:
public function actionJsoncalendar($start=NULL,$end=NULL,$_=NULL){ \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; $times = \app\modules\timetrack\models\Timetable::find()->where(array('category'=>\app\modules\timetrack\models\Timetable::CAT_TIMETRACK))->all(); $events = array(); foreach ($times AS $time){ //Testing $Event = new \yii2-fullcalendar\models\Event(); $Event->id = $time->id; $Event->title = $time->categoryAsString; $Event->start = date('Y-m-d\TH:i:s\Z',strtotime($time->date_start.' '.$time->time_start)); $Event->end = date('Y-m-d\TH:i:s\Z',strtotime($time->date_end.' '.$time->time_end)); $events[] = $Event; } return $events; }
jaxwifi/yii2-fullcalendar 适用场景与选型建议
jaxwifi/yii2-fullcalendar 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 980 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 05 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「widget」 「fullcalendar」 「yii2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jaxwifi/yii2-fullcalendar 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jaxwifi/yii2-fullcalendar 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jaxwifi/yii2-fullcalendar 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A custom URL rule class for Yii 2 which allows to create translated URL rules
Yii2 LightBox image galary widget uses Lightbox v2.10.0 by Lokesh Dhakar
Yii2 fullcalendar widget (fork)
A fullcalendar implementation for TYPO3 CMS
Yii2 Widgets for the Full Callendar javascript calendar
Add a weather widget to Flarum
统计信息
- 总下载量: 980
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-04