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


PHP DateTimeUtil::isDateTimeValueNull方法代码示例

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


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

示例1: evaluateTimeTriggerBeforeSave

 /**
  * @see parent::evaluateTimeTriggerBeforeSave for explanation of method
  * @param RedBeanModel $model
  * @param $attribute
  * @param $changeRequiredToProcess - if a change in value is required to confirm the time trigger is true
  * @return bool
  * @throws NotSupportedException
  */
 public function evaluateTimeTriggerBeforeSave(RedBeanModel $model, $attribute, $changeRequiredToProcess = true)
 {
     assert('is_string($attribute)');
     assert('is_bool($changeRequiredToProcess)');
     if ($this->trigger->valueType != MixedDateTypesSearchFormAttributeMappingRules::TYPE_IS_TIME_FOR) {
         throw new NotSupportedException();
     }
     return ($this->resolveAttributeValueIsChanged($model, $attribute) || !$changeRequiredToProcess) && DateTimeUtil::isDateTimeValueNull($model, $attribute) === false;
 }
开发者ID:youprofit,项目名称:Zurmo,代码行数:17,代码来源:DateTimeTriggerRules.php

示例2: renderMissionContent

 protected function renderMissionContent()
 {
     $userUrl = Yii::app()->createUrl('/users/default/details', array('id' => $this->model->createdByUser->id));
     $content = '<div class="comment model-details-summary">';
     $content .= ZurmoHtml::link($this->model->createdByUser->getAvatarImage(100), $userUrl);
     $content .= '<span class="user-details">';
     $content .= ZurmoHtml::link(strval($this->model->createdByUser), $userUrl, array('class' => 'user-link'));
     $content .= '</span>';
     $element = new TextAreaElement($this->model, 'description');
     $element->nonEditableTemplate = '<div class="comment-content">{content}</div>';
     $content .= $element->render();
     if ($this->model->reward != null) {
         $element = new TextElement($this->model, 'reward');
         $element->nonEditableTemplate = '<div class="comment-content">' . Zurmo::t('MissionsModule', 'Reward') . ': {content}</div>';
         $content .= $element->render();
     }
     if ($this->model->takenByUser->id > 0) {
         $element = new UserElement($this->model, 'takenByUser');
         $element->nonEditableTemplate = '<div class="comment-content">' . Zurmo::t('MissionsModule', 'Taken By') . ': {content}</div>';
         $content .= $element->render();
     }
     if (!DateTimeUtil::isDateTimeValueNull($this->model, 'dueDateTime')) {
         $element = new DateTimeElement($this->model, 'dueDateTime');
         $element->nonEditableTemplate = '<div class="comment-content">' . Zurmo::t('MissionsModule', 'Due') . ': {content}</div>';
         $content .= $element->render();
     }
     $date = '<span class="comment-details"><strong>' . DateTimeUtil::convertDbFormattedDateTimeToLocaleFormattedDisplay($this->model->createdDateTime, 'long', null) . '</strong></span>';
     $content .= $date;
     if ($this->model->files->count() > 0) {
         $element = new FilesElement($this->model, 'null');
         $element->nonEditableTemplate = '<div>{content}</div>';
         $content .= '<div><strong>' . Zurmo::t('MissionsModule', 'Attachments') . '</strong></div>';
         $content .= $element->render();
     }
     $element = new MissionStatusElement($this->model, 'status');
     $element->nonEditableTemplate = '<div class="comment-content">' . Zurmo::t('MissionsModule', 'Status') . ': {content}</div>';
     $content .= $element->render();
     $content .= '</div>';
     return ZurmoHtml::tag('div', array('id' => 'ModelDetailsSummaryView'), $content);
 }
开发者ID:sandeep1027,项目名称:zurmo_,代码行数:40,代码来源:MissionDetailsView.php


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