本文整理汇总了PHP中DateTimeHelper::getDateTimeArray方法的典型用法代码示例。如果您正苦于以下问题:PHP DateTimeHelper::getDateTimeArray方法的具体用法?PHP DateTimeHelper::getDateTimeArray怎么用?PHP DateTimeHelper::getDateTimeArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DateTimeHelper
的用法示例。
在下文中一共展示了DateTimeHelper::getDateTimeArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setViewMetaInfos
/**
* setViewMetaInfos
* @author Thomas Schedler <tsh@massiveart.com>
* @version 1.0
*/
private function setViewMetaInfos()
{
if (is_object($this->objForm) && $this->objForm instanceof GenericForm) {
$this->view->version = $this->objForm->Setup()->getFormVersion();
$this->view->publisher = $this->objForm->Setup()->getPublisherName();
$this->view->showinnavigation = $this->objForm->Setup()->getShowInNavigation();
$this->view->changeUser = $this->objForm->Setup()->getChangeUserName();
$this->view->publishDate = $this->objForm->Setup()->getPublishDate('d. M. Y, H:i');
$this->view->changeDate = $this->objForm->Setup()->getChangeDate('d. M. Y, H:i');
$this->view->statusOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT statusTitles.title AS DISPLAY FROM statusTitles WHERE statusTitles.idStatus = status.id AND statusTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM status', $this->objForm->Setup()->getStatusId());
$this->view->creatorOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, CONCAT(fname, \' \', sname) AS DISPLAY FROM users', $this->objForm->Setup()->getCreatorId());
if ($this->objForm->Setup()->getIsStartElement(false) == true) {
$this->view->typeOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT pageTypeTitles.title AS DISPLAY FROM pageTypeTitles WHERE pageTypeTitles.idPageTypes = pageTypes.id AND pageTypeTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM pageTypes WHERE startpage = 1 AND active = 1 ORDER BY DISPLAY', $this->objForm->Setup()->getElementTypeId());
} else {
$this->view->typeOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT pageTypeTitles.title AS DISPLAY FROM pageTypeTitles WHERE pageTypeTitles.idPageTypes = pageTypes.id AND pageTypeTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM pageTypes WHERE page = 1 AND active = 1 ORDER BY DISPLAY', $this->objForm->Setup()->getElementTypeId());
}
$this->view->blnIsRootLevelChild = $this->objForm->Setup()->getParentTypeId() == $this->core->sysConfig->parent_types->rootlevel ? true : false;
$this->view->navigationOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT navigationOptionTitles.title FROM navigationOptionTitles WHERE navigationOptionTitles.idNavigationOptions = navigationOptions.id AND navigationOptionTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM navigationOptions WHERE active = 1', $this->objForm->Setup()->getShowInNavigation());
$this->view->destinationId = $this->objForm->Setup()->getDestinationId();
$this->view->destinationOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT categories.id AS VALUE, categoryTitles.title AS DISPLAY FROM categories INNER JOIN categoryTitles ON categoryTitles.idCategories = categories.id AND categoryTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ' WHERE categories.idParentCategory = 466 ORDER BY categoryTitles.title', $this->objForm->Setup()->getDestinationId());
$this->view->arrPublishDate = DateTimeHelper::getDateTimeArray($this->objForm->Setup()->getPublishDate());
$this->view->monthOptions = DateTimeHelper::getOptionsMonth(false, $this->objForm->Setup()->getPublishDate('n'));
$this->view->blnIsStartPage = $this->objForm->Setup()->getIsStartElement(false);
if ($this->objForm->Setup()->getField('url')) {
$strBaseUrl = $this->getModelFolders()->getRootLevelMainUrl($this->objForm->Setup()->getRootLevelId());
if (substr_count($strBaseUrl, '.') <= 1) {
$strBaseUrl = str_replace('http://', 'http://www.', $strBaseUrl);
}
$this->view->pageurl = $strBaseUrl . $this->objForm->Setup()->getField('url')->getValue();
}
$this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT languages.id AS VALUE, languages.languageCode AS DISPLAY FROM languages INNER JOIN rootLevelLanguages ON rootLevelLanguages.idLanguages = languages.id AND rootLevelLanguages.idRootLevels = ' . $this->objForm->Setup()->getRootLevelId() . ' ORDER BY languages.sortOrder, languages.languageCode', $this->objForm->Setup()->getLanguageId());
$this->view->authorizedDelete = $this->objForm->Setup()->getIsStartElement(false) == true || $this->objForm->Setup()->getActionType() == $this->core->sysConfig->generic->actions->add ? false : Security::get()->isAllowed('portals', Security::PRIVILEGE_DELETE, false, false);
$this->view->authorizedUpdate = Security::get()->isAllowed('portals', Security::PRIVILEGE_UPDATE, false, false);
}
}
示例2: setViewMetaInfos
/**
* setViewMetaInfos
* @author Thomas Schedler <tsh@massiveart.com>
* @version 1.0
*/
private function setViewMetaInfos()
{
if (is_object($this->objForm) && $this->objForm instanceof GenericForm) {
$this->view->version = $this->objForm->Setup()->getFormVersion();
$this->view->publisher = $this->objForm->Setup()->getPublisherName();
$this->view->showinnavigation = $this->objForm->Setup()->getShowInNavigation();
$this->view->languagefallback = $this->objForm->Setup()->getLanguageFallbackId();
$this->view->changeUser = $this->objForm->Setup()->getChangeUserName();
$this->view->publishDate = $this->objForm->Setup()->getPublishDate('d. M. Y, H:i');
$this->view->changeDate = $this->objForm->Setup()->getChangeDate('d. M. Y, H:i');
$this->view->statusOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT statusTitles.title AS DISPLAY FROM statusTitles WHERE statusTitles.idStatus = status.id AND statusTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM status', $this->objForm->Setup()->getStatusId());
$this->view->creatorOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, CONCAT(fname, \' \', sname) AS DISPLAY FROM users', $this->objForm->Setup()->getCreatorId());
$this->core->logger->debug('getCreatorId: ' . $this->objForm->Setup()->getCreatorId());
if ($this->objForm->Setup()->getIsStartElement(false) == true) {
$this->view->typeOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT globalTypeTitles.title AS DISPLAY FROM globalTypeTitles WHERE globalTypeTitles.idGlobalTypes = globalTypes.id AND globalTypeTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM globalTypes WHERE startelement = 1 AND idRootLevelGroups = ' . $this->objForm->Setup()->getRootLevelGroupId() . ' ORDER BY DISPLAY', $this->objForm->Setup()->getElementTypeId());
} else {
$this->view->typeOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT globalTypeTitles.title AS DISPLAY FROM globalTypeTitles WHERE globalTypeTitles.idGlobalTypes = globalTypes.id AND globalTypeTitles.idLanguages = ' . $this->objForm->Setup()->getFormLanguageId() . ') AS DISPLAY FROM globalTypes WHERE element = 1 AND idRootLevelGroups = ' . $this->objForm->Setup()->getRootLevelGroupId() . ' ORDER BY DISPLAY', $this->objForm->Setup()->getElementTypeId());
}
$this->view->arrPublishDate = DateTimeHelper::getDateTimeArray($this->objForm->Setup()->getPublishDate());
$this->view->monthOptions = DateTimeHelper::getOptionsMonth(false, $this->objForm->Setup()->getPublishDate('n'));
$this->view->blnIsStartGlobal = $this->objForm->Setup()->getIsStartElement(false);
if ($this->objForm->Setup()->getField('url')) {
$this->view->globalurl = $this->objForm->Setup()->getField('url')->getValue();
//add shop preview url
if ($this->objForm->Setup()->getRootLevelGroupId() == $this->core->sysConfig->root_level_groups->product && $this->core->config->shop->root_level_id) {
$this->view->addonurls = array(array('url' => $this->getModelFolders()->getRootLevelMainUrl($this->core->config->shop->root_level_id) . $this->objForm->Setup()->getField('url')->getValue(), 'title' => $this->core->translate->_('Shop')));
}
}
$arrSecurityCheck = array();
if (!Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId(), Security::PRIVILEGE_VIEW, false, false)) {
$arrSecurityCheck = array('ResourceKey' => Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId() . '_%d', 'Privilege' => Security::PRIVILEGE_VIEW, 'CheckForAllLanguages' => false, 'IfResourceNotExists' => false);
}
$this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages ORDER BY sortOrder, languageCode', $this->objForm->Setup()->getLanguageId(), $arrSecurityCheck);
$blnGeneralDeleteAuthorization = Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId(), Security::PRIVILEGE_DELETE, false, false);
$blnGeneralUpdateAuthorization = Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId(), Security::PRIVILEGE_UPDATE, false, false);
$this->view->authorizedDelete = $this->objForm->Setup()->getIsStartElement(false) == true || $this->objForm->Setup()->getActionType() == $this->core->sysConfig->generic->actions->add ? false : ($blnGeneralDeleteAuthorization == true ? $blnGeneralDeleteAuthorization : Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId() . '_' . $this->objForm->Setup()->getLanguageId(), Security::PRIVILEGE_DELETE, false, false));
$this->view->authorizedUpdate = $blnGeneralUpdateAuthorization == true ? $blnGeneralUpdateAuthorization : Security::get()->isAllowed(Security::RESOURCE_ROOT_LEVEL_PREFIX . $this->objForm->Setup()->getRootLevelId() . '_' . $this->objForm->Setup()->getLanguageId(), Security::PRIVILEGE_UPDATE, false, false);
$this->view->languageFallbackOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages WHERE isFallback = 1 AND id != ' . $this->objForm->Setup()->getLanguageId() . ' ORDER BY sortOrder, languageCode', $this->objForm->Setup()->getLanguageFallbackId());
}
}
示例3: setViewMetaInfos
/**
* setViewMetaInfos
* @author Thomas Schedler <tsh@massiveart.com>
* @version 1.0
*/
private function setViewMetaInfos()
{
if (is_object($this->objForm) && $this->objForm instanceof GenericForm) {
$this->view->version = $this->objForm->Setup()->getFormVersion();
$this->view->publisher = $this->objForm->Setup()->getPublisherName();
$this->view->showinnavigation = $this->objForm->Setup()->getShowInNavigation();
$this->view->changeUser = $this->objForm->Setup()->getChangeUserName();
$this->view->publishDate = $this->objForm->Setup()->getPublishDate('d. M. Y, H:i');
$this->view->changeDate = $this->objForm->Setup()->getChangeDate('d. M. Y, H:i');
$this->view->statusOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT statusTitles.title AS DISPLAY FROM statusTitles WHERE statusTitles.idStatus = status.id AND statusTitles.idLanguages = ' . $this->objForm->Setup()->getLanguageId() . ') AS DISPLAY FROM status', $this->objForm->Setup()->getStatusId());
$this->view->creatorOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, CONCAT(fname, \' \', sname) AS DISPLAY FROM users', $this->objForm->Setup()->getCreatorId());
if ($this->objForm->Setup()->getIsStartElement(false) == true) {
$this->view->typeOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT pageTypeTitles.title AS DISPLAY FROM pageTypeTitles WHERE pageTypeTitles.idPageTypes = pageTypes.id AND pageTypeTitles.idLanguages = ' . $this->objForm->Setup()->getLanguageId() . ') AS DISPLAY FROM pageTypes WHERE startpage = 1', $this->objForm->Setup()->getElementTypeId());
} else {
$this->view->typeOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, (SELECT pageTypeTitles.title AS DISPLAY FROM pageTypeTitles WHERE pageTypeTitles.idPageTypes = pageTypes.id AND pageTypeTitles.idLanguages = ' . $this->objForm->Setup()->getLanguageId() . ') AS DISPLAY FROM pageTypes WHERE page = 1', $this->objForm->Setup()->getElementTypeId());
}
$this->view->arrPublishDate = DateTimeHelper::getDateTimeArray($this->objForm->Setup()->getPublishDate());
$this->view->monthOptions = DateTimeHelper::getOptionsMonth(false, $this->objForm->Setup()->getPublishDate('n'));
$this->view->blnIsStartPage = $this->objForm->Setup()->getIsStartElement(false);
if ($this->objForm->Setup()->getField('url')) {
$this->view->pageurl = $this->objForm->Setup()->getField('url')->getValue();
}
if ($this->objForm->Setup()->getActionType() == $this->core->sysConfig->generic->actions->edit && $this->objForm->Setup()->getElementTypeId() != $this->core->sysConfig->page_types->link->id) {
$this->view->languageOptions = HtmlOutput::getOptionsOfSQL($this->core, 'SELECT id AS VALUE, languageCode AS DISPLAY FROM languages', $this->objForm->Setup()->getLanguageId());
}
}
}