本文整理汇总了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;
}
示例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);
}