当前位置: 首页>>代码示例>>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;未经允许,请勿转载。