當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Task::calcStartTime方法代碼示例

本文整理匯總了PHP中app\models\Task::calcStartTime方法的典型用法代碼示例。如果您正苦於以下問題:PHP Task::calcStartTime方法的具體用法?PHP Task::calcStartTime怎麽用?PHP Task::calcStartTime使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\models\Task的用法示例。


在下文中一共展示了Task::calcStartTime方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getDatatableColumns

 protected function getDatatableColumns($entityType, $hideClient)
 {
     return [['client_name', function ($model) {
         return $model->client_public_id ? link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model)) : '';
     }, !$hideClient], ['created_at', function ($model) {
         return link_to("tasks/{$model->public_id}/edit", Task::calcStartTime($model));
     }], ['time_log', function ($model) {
         return Utils::formatTime(Task::calcDuration($model));
     }], ['description', function ($model) {
         return $model->description;
     }], ['invoice_number', function ($model) {
         return self::getStatusLabel($model);
     }]];
 }
開發者ID:magicians,項目名稱:invoiceninja,代碼行數:14,代碼來源:TaskService.php

示例2: getDatatable

 public function getDatatable($clientPublicId = null)
 {
     $tasks = $this->taskRepo->find($clientPublicId, Input::get('sSearch'));
     $table = Datatable::query($tasks);
     if (!$clientPublicId) {
         $table->addColumn('checkbox', function ($model) {
             return '<input type="checkbox" name="ids[]" value="' . $model->public_id . '" ' . Utils::getEntityRowClass($model) . '>';
         })->addColumn('client_name', function ($model) {
             return $model->client_public_id ? link_to('clients/' . $model->client_public_id, Utils::getClientDisplayName($model)) : '';
         });
     }
     return $table->addColumn('created_at', function ($model) {
         return link_to("tasks/{$model->public_id}/edit", Task::calcStartTime($model));
     })->addColumn('time_log', function ($model) {
         return gmdate('H:i:s', Task::calcDuration($model));
     })->addColumn('description', function ($model) {
         return $model->description;
     })->addColumn('invoice_number', function ($model) {
         return self::getStatusLabel($model);
     })->addColumn('dropdown', function ($model) {
         $str = '<div class="btn-group tr-action" style="visibility:hidden;">
   							<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown">
     							' . trans('texts.select') . ' <span class="caret"></span>
   							</button>
   							<ul class="dropdown-menu" role="menu">';
         if (!$model->deleted_at || $model->deleted_at == '0000-00-00') {
             $str .= '<li><a href="' . URL::to('tasks/' . $model->public_id . '/edit') . '">' . trans('texts.edit_task') . '</a></li>';
         }
         if ($model->invoice_number) {
             $str .= '<li>' . link_to("/invoices/{$model->invoice_public_id}/edit", trans('texts.view_invoice')) . '</li>';
         } elseif ($model->is_running) {
             $str .= '<li><a href="javascript:stopTask(' . $model->public_id . ')">' . trans('texts.stop_task') . '</a></li>';
         } elseif (!$model->deleted_at || $model->deleted_at == '0000-00-00') {
             $str .= '<li><a href="javascript:invoiceTask(' . $model->public_id . ')">' . trans('texts.invoice_task') . '</a></li>';
         }
         if (!$model->deleted_at || $model->deleted_at == '0000-00-00') {
             $str .= '<li class="divider"></li>
 						    <li><a href="javascript:archiveEntity(' . $model->public_id . ')">' . trans('texts.archive_task') . '</a></li>';
         } else {
             $str .= '<li><a href="javascript:restoreEntity(' . $model->public_id . ')">' . trans('texts.restore_task') . '</a></li>';
         }
         if (!$model->is_deleted) {
             $str .= '<li><a href="javascript:deleteEntity(' . $model->public_id . ')">' . trans('texts.delete_task') . '</a></li></ul>';
         }
         return $str . '</div>';
     })->make();
 }
開發者ID:GhDj,項目名稱:erp-fac-fin,代碼行數:47,代碼來源:TaskController.php

示例3: columns

 public function columns()
 {
     return [['client_name', function ($model) {
         if (!Auth::user()->can('viewByOwner', [ENTITY_CLIENT, $model->client_user_id])) {
             return Utils::getClientDisplayName($model);
         }
         return $model->client_public_id ? link_to("clients/{$model->client_public_id}", Utils::getClientDisplayName($model))->toHtml() : '';
     }, !$this->hideClient], ['created_at', function ($model) {
         return link_to("tasks/{$model->public_id}/edit", Task::calcStartTime($model))->toHtml();
     }], ['time_log', function ($model) {
         return Utils::formatTime(Task::calcDuration($model));
     }], ['description', function ($model) {
         return $model->description;
     }], ['invoice_number', function ($model) {
         return self::getStatusLabel($model);
     }]];
 }
開發者ID:rafaelsisweb,項目名稱:invoice-ninja,代碼行數:17,代碼來源:TaskDatatable.php


注:本文中的app\models\Task::calcStartTime方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。