当前位置: 首页>>代码示例>>PHP>>正文


PHP ST::deployColorScheme方法代码示例

本文整理汇总了PHP中ST::deployColorScheme方法的典型用法代码示例。如果您正苦于以下问题:PHP ST::deployColorScheme方法的具体用法?PHP ST::deployColorScheme怎么用?PHP ST::deployColorScheme使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ST的用法示例。


在下文中一共展示了ST::deployColorScheme方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: prepareEvents

 public function prepareEvents($events)
 {
     if (count($events)) {
         foreach ($events as $event) {
             $start = $event->start_date_time;
             $end = $event->end_date_time;
             //
             if (isset($event->fromCa)) {
                 $event->start_date_time = $event->start_date_time instanceof DateTime ? $event->start_date_time : date_create($event->start_date_time);
                 $event->end_date_time = $event->end_date_time instanceof DateTime ? $event->end_date_time : date_create($event->end_date_time);
                 $start = $event->start_date_time->setTimeZone(new DateTimeZone(App::$instance->opt->ca_timezone));
                 $end = $event->end_date_time->setTimeZone(new DateTimeZone(App::$instance->opt->ca_timezone));
                 $mskStart = clone $start;
                 $mskEnd = clone $end;
                 $start->setTimezone(new DateTimeZone(App::$instance->opt->timezone));
                 $end->setTimezone(new DateTimeZone(App::$instance->opt->timezone));
                 $event->mks_start_time = $mskStart->format("H:i");
                 $event->mks_end_time = $mskEnd->format("H:i");
                 $event->mks_date = $mskStart->format("d.m.Y");
                 $event->mks_start = $mskStart->format("Y-m-d H:i");
                 $event->mks_end = $mskEnd->format("Y-m-d H:i");
             }
             $event->start_time = $start->format("H:i");
             $event->end_time = $end->format("H:i");
             $event->date = $start->format("d.m.Y");
             $event->start = $start->format("Y-m-d H:i");
             $event->end = $end->format("Y-m-d H:i");
             ST::deployColorScheme($event, App::$instance->user->colors['local_default']);
             if (!isset($event->fromCa)) {
                 $event->titleCustom = "<span style='font-size: 10px;'><span class='label label-success'>#" . $event->id . "</span> ";
             } else {
                 $event->titleCustom = "<span style='font-size: 10px;'><span class='label label-warning'>#" . $event->id . "</span> ";
             }
             if ($event->status == VKS_STATUS_PENDING) {
                 $event->titleCustom = $event->titleCustom . '<span class="label label-info">Pending</span> ';
                 ST::deployColorScheme($event, App::$instance->user->colors['local_pending']);
             }
             if (isset($event->fromCa)) {
                 $event->titleCustom = $event->titleCustom . '<span class="label label-info" style="background-color: brown;">СA</span> ';
                 ST::deployColorScheme($event, App::$instance->user->colors['fromca_local_linked']);
                 if (!$event->isLinked) {
                     if (!$event->tbFlag) {
                         ST::deployColorScheme($event, App::$instance->user->colors['fromca_no_local_linked']);
                     }
                     $event->titleCustom = $event->titleCustom . '<span class="label label-info" style="background-color: #F2EE0F; color: #000;">НЗ</span> ';
                 }
                 if ($event->flag) {
                     ST::deployColorScheme($event, App::$instance->user->colors['fromca_with_flag']);
                 }
                 if ($event->tbFlag) {
                     ST::deployColorScheme($event, App::$instance->user->colors['local_with_flag']);
                 }
             }
             if (Auth::isAdmin(App::$instance) && isset($event->link_ca_vks_id) && !$event->other_tb_required) {
                 $event->titleCustom = $event->titleCustom . '<span class="label label-info">TbToCa</span>';
                 //                $event->backgroundColor = "#B9BAB2";
                 //                $event->borderColor = "#B9BAB2";
             }
             if (!isset($event->fromCa) && $event->other_tb_required) {
                 $event->titleCustom = $event->titleCustom . '<span class="label label-info">TbToTb</span> ';
             }
             if (!isset($event->fromCa) && $event->is_simple) {
                 $event->titleCustom = $event->titleCustom . '<span class="label label-info">Simple</span> ';
                 ST::deployColorScheme($event, App::$instance->user->colors['local_simple']);
             }
             if (Auth::isAdmin(App::$instance)) {
                 if (!isset($event->fromCa) && $event->record_required) {
                     $event->titleCustom = $event->titleCustom . "<span class='label label-danger'><span class='glyphicon glyphicon-facetime-video'></span></span> ";
                 }
                 if (!isset($event->fromCa)) {
                     if ($event->flag) {
                         ST::deployColorScheme($event, App::$instance->user->colors['local_with_flag']);
                         //                    $event->titleCustom = $event->titleCustom.'<span class="label label-danger" style="background-color: #F730D5">Flag</span> ';
                     }
                 } else {
                 }
             }
             if (Auth::isAdmin(App::$instance)) {
                 if ($event->admin_id == App::$instance->user->id) {
                     ST::deployColorScheme($event, App::$instance->user->colors['local_im_admin']);
                 }
             }
             if (Auth::isLogged(App::$instance) && !Auth::isAdmin(App::$instance)) {
                 if ($event->owner_id == App::$instance->user->id && $event->status != VKS_STATUS_PENDING) {
                     ST::deployColorScheme($event, App::$instance->user->colors['local_im_owner']);
                 }
             }
             $event->titleCustom .= "<span style='font-size: 9px;'>" . $event->start_time . " - " . $event->end_time . "</span>";
             $event->titleCustom .= "<div class='plank-title' style='font-size: 9px; word-break: normal; word-wrap: normal; white-space: pre-wrap;'>" . $event->title . "</div></span>";
             if (Auth::isAdmin(App::$instance)) {
                 $event->codes = '-';
                 if (isset($event->connection_codes) && count($event->connection_codes)) {
                     $tmp = array();
                     foreach ($event->connection_codes as $code) {
                         $tmp[] = $code->value;
                     }
                     $event->codes = implode(", ", $tmp);
                 }
                 $event->titleCustom .= "<span class='' style='font-size: 9px;'>code: " . $event->codes . "</span>";
             }
//.........这里部分代码省略.........
开发者ID:inilotic,项目名称:vks_nodes_core,代码行数:101,代码来源:CalendarFeed_controller.php


注:本文中的ST::deployColorScheme方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。