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


PHP DateField::set_default_config方法代碼示例

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


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

示例1: getCMSFields

 public function getCMSFields()
 {
     DateField::set_default_config('showcalendar', true);
     $f = new FieldList(new DateField('StartDate', _t('CalendarDateTime.STARTDATE', 'Start date')), new DateField('EndDate', _t('CalendarDateTime.ENDDATE', 'End date')), new TimeField('StartTime', _t('CalendarDateTime.STARTTIME', 'Start time')), new TimeField('EndTime', _t('CalendarDateTime.ENDTIME', 'End time')), new CheckboxField('AllDay', _t('CalendarDateTime.ALLDAY', 'This event lasts all day')));
     $this->extend('updateCMSFields', $f);
     return $f;
 }
開發者ID:vinstah,項目名稱:body,代碼行數:7,代碼來源:CalendarDateTime.php

示例2: getCMSFields

 public function getCMSFields()
 {
     DateField::set_default_config('showcalendar', true);
     $f = new FieldList(new DateField('ExceptionDate', _t('CalendarDateTime.EXCEPTIONDATE', 'Exception Date')));
     $this->extend('updateCMSFields', $f);
     return $f;
 }
開發者ID:tim-lar,項目名稱:silverstripe-event-calendar,代碼行數:7,代碼來源:RecurringException.php

示例3: addtaskForm

 public function addtaskForm()
 {
     $project = Project::get()->map('ID', 'Title');
     DateField::set_default_config('showcalendar', true);
     DateField::set_default_config('dateformat', 'dd/MM/YYYY');
     $fields = new FieldList(new DropDownField('ProjectID', 'Project', $project), new TextField('Title'), new TextAreaField('Description'), new DropDownField("Status", "Status", singleton('Task')->dbObject('Status')->enumValues()), new DateField('DueDate', 'Due Date'), new NumericField('OriginalHourEstimate', 'Est. in Hours'));
     $actions = new FieldList(new FormAction('dotaskadd', 'Submit'));
     return new Form($this, 'addtaskForm', $fields, $actions);
 }
開發者ID:micschk,項目名稱:SilverProject,代碼行數:9,代碼來源:addTaskPage.php

示例4: addWorkForm

 public function addWorkForm()
 {
     $project = Task::get()->map('ID', 'Title');
     DateField::set_default_config('showcalendar', true);
     DateField::set_default_config('dateformat', 'dd/MM/YYYY');
     $fields = new FieldList(new DropDownField('TaskID', 'Project', $project), new TextField('Title'), new DropDownField("Status", "Status", singleton('Task')->dbObject('Status')->enumValues()), new DateField('Date', 'Date'), new NumericField('HourSpent', 'Time Spent in Hours'));
     $actions = new FieldList(new FormAction('doworkadd', 'Submit'));
     return new Form($this, 'addWorkForm', $fields, $actions);
 }
開發者ID:micschk,項目名稱:SilverProject,代碼行數:9,代碼來源:WorkLog.php

示例5: editTaskForm

 function editTaskForm()
 {
     $task = $this->getTask();
     DateField::set_default_config('showcalendar', true);
     DateField::set_default_config('dateformat', 'dd/MM/YYYY');
     $fields = new FieldList(new HiddenField('ID', 'aID'), new LiteralField("LiteralField", "<div class='addForm'>"), new LiteralField("LiteralField", "<div class='formleft'>"), new TextField('Title'), new DateField('DueDate', 'Due Date'), new LiteralField("LiteralField", "</div>"), new LiteralField("LiteralField", "<div class='formright'>"), new TextAreaField('Description', 'Description'), new LiteralField("LiteralField", "</div>"), new LiteralField("LiteralField", "<div class='formleft'>"), new LiteralField("LiteralField", "<div class='checkboxes'>"), new OptionSetField('Status', 'Status', singleton('Task')->dbObject('Status')->enumValues()), new LiteralField("LiteralField", "</div>"), new LiteralField("LiteralField", "</div>"), new LiteralField("LiteralField", "</div>"));
     $actions = new FieldList(new LiteralField("LiteralField", "<div class='addForm'>"), new LiteralField("LiteralField", "<div class='formright'>"), new FormAction("dosave", "Save"), new LiteralField("LiteralField", "</div>"), new LiteralField("LiteralField", "</div>"));
     $form = new Form($this, 'editTaskForm', $fields, $actions);
     $Params = $this->getURLParams();
     if (is_numeric($Params['ID']) && ($edittask = DataObject::get_by_id('Task', $Params['ID']))) {
         $form->loadDataFrom($edittask->data());
     }
     return $form;
 }
開發者ID:micschk,項目名稱:SilverProject,代碼行數:14,代碼來源:TaskPage.php

示例6: addTaskForm

 public function addTaskForm()
 {
     $theproj = $this->getProjectID();
     DateField::set_default_config('showcalendar', true);
     DateField::set_default_config('dateformat', 'dd/MM/YYYY');
     $fields = new FieldList(new LiteralField("LiteralField", "<h3>Add a Task</h3>"), new HiddenField('ProjectID', '', $theproj), new LiteralField("LiteralField", "<table class='standard'>"), new LiteralField("LiteralField", "<thead>"), new LiteralField("LiteralField", "<tr>"), new LiteralField("LiteralField", "<th class='form450'>Title</th>"), new LiteralField("LiteralField", "<th class='form90'>Due Date</th>"), new LiteralField("LiteralField", "<th class='form450'>Description</th>"), new LiteralField("LiteralField", "<th class='form90'>Hours Est.</th>"), new LiteralField("LiteralField", "<th>&nbsp;</th>"), new LiteralField("LiteralField", "</tr>"), new LiteralField("LiteralField", "</thead>"), new LiteralField("LiteralField", "<tbody>"), new LiteralField("LiteralField", "<tr>"), new LiteralField("LiteralField", "<td>"), new TextField('Title', ''), new LiteralField("LiteralField", "</td>"), new LiteralField("LiteralField", "<td>"), new DateField('DueDate', ''), new LiteralField("LiteralField", "</td>"), new LiteralField("LiteralField", "<td>"), new TextAreaField('Description', ''), new LiteralField("LiteralField", "</td>"), new LiteralField("LiteralField", "<td class='hours'>"), new NumericField('OriginalHourEstimate', '', '0'), new LiteralField("LiteralField", "</td>"));
     $actions = new FieldList(new LiteralField("LiteralField", "<td>"), new FormAction('doTaskadd', 'Submit'), new LiteralField("LiteralField", "</td>"), new LiteralField("LiteralField", "</tr>"), new LiteralField("LiteralField", "<tbody>"), new LiteralField("LiteralField", "</table>"));
     return new Form($this, 'addTaskForm', $fields, $actions);
 }
開發者ID:micschk,項目名稱:SilverProject,代碼行數:9,代碼來源:ProjectPage.php


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