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


PHP DateTimeHelper::getDateObject方法代碼示例

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


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

示例1: getSingleEditForm


//.........這裏部分代碼省略.........
                              </ul>
                            </div>
                          </li>
                        </ol>
                        <script type="text/javascript" language="javascript">//<![CDATA[
                          FileTags' . $objFile->id . '_list = new FacebookList(\'FileTags' . $objFile->id . '\', \'FileTags' . $objFile->id . '_autocompleter\',{ newValues: true, regexSearch: true });
                          ' . $this->getAllTagsForAutocompleter('FileTags' . $objFile->id) . '
                          //]]>
                        </script>                           
                      </div>                         
                      <div class="clear"></div>';
         if ($blnIsImage == false) {
             $strOutput .= '
                      <div class="mediafield">
                        <div class="mediatop">
                          ' . $this->core->translate->_('Add_medias') . ': <img src="/zoolu-statics/images/icons/icon_addmedia.png" width="16" height="16" onclick="myMedia.getAddMediaOverlay(\'divMediaContainer_documentpic\')" />
                        </div>
                        <div id="divMediaContainer_documentpic" class="media">
                        </div>
                        <input type="hidden" name="documentpic" id="documentpic" value="' . ($objFile->idFiles != null && $objFile->idFiles > 0 ? '[' . $objFile->idFiles . ']' : '') . '" /> 
                      </div>';
             //FIXME: use syntax for applying one file
         }
         if ($blnIsImage == true) {
             $strOutput .= '
                    </div>
                    <div class="clear"></div>
                    <div class="spacer1"></div>';
         }
         $strMediaUrl = '';
         if ($blnIsImage == true) {
             $strOutput .= '
                    <div class="mediasizes">
                      <select id="mediaSizes" onchange="$(\'singleMediaUrl\').value = $F(\'singleFileBasePath\') + this.value + $F(\'singleFileName\')">';
             foreach ($arrImagesSizes as $arrImageSize) {
                 if (isset($arrImageSize['display']) && isset($arrImageSize['display']['single_edit'])) {
                     if ($strMediaUrl == '') {
                         $strMediaUrl = $strBasePath . $arrImageSize['folder'] . '/' . $objFile->filename . '?v=' . $objFile->version;
                     }
                     $strOutput .= '
                        <option value="' . $arrImageSize['folder'] . '/">' . $arrImageSize['folder'] . '</option>';
                 }
             }
             $strOutput .= '
                      </select>
                    </div>';
         } else {
             $strMediaUrl = 'http://' . $_SERVER['HTTP_HOST'] . $strDownloadLink;
         }
         $strOutput .= '
                    <div class="medialink">
                      <input type="text" id="singleMediaUrl" readonly="readonly" value="' . $strMediaUrl . '" onclick="this.select()"/><br/>
                      <div id="d_clip_container" style="float:right; margin:0 10px 0 0; position:relative;">
                        <div id="d_clip_button">[copy to clipboard]</div>
                      </div>
                      <div class="clear"></div> 
                      <input type="hidden" id="singleFileName" value="' . $objFile->filename . '?v=' . $objFile->version . '"/>
                      <input type="hidden" id="singleFileBasePath" value="' . $strBasePath . '"/>
                    </div>                       
                    <div class="clear"></div>
                    
                    <div class="spacer1"></div>
                    <div class="mediasingleupload">';
         if ($blnAuthorizedToUpdate == true) {
             $strOutput .= '
                      <label for="txtFileName" class="gray666 bold">' . $this->core->translate->_('New_version') . '</label><br/>
                      <div>
                        <input type="text" id="txtFileName" disabled="true" />
                        <span id="spanButtonPlaceholder"></span>
                      </div>
                      <div id="fsUploadProgress"></div>';
         }
         if ($blnIsImage == false) {
             $strOutput .= '
                    </div>';
         }
         if ($objFileVersions != null && $objFileVersions instanceof Zend_Db_Table_Rowset_Abstract) {
             $objCreated = DateTimeHelper::getDateObject();
             $objArchived = DateTimeHelper::getDateObject();
             $strOutput .= '
                      <div class="spacer1"></div>
                      <label for="txtFileName" class="gray666 bold">' . $this->core->translate->_('Version_list') . '</label><br/>
                      <div class="mediaversions">';
             foreach ($objFileVersions as $objFileVersion) {
                 if ($objFileVersion->created != null && $objFileVersion->archived != null) {
                     $objCreated->set($objFileVersion->created);
                     $objArchived->set($objFileVersion->archived);
                     $strOutput .= '
                        <div class="version"><a href="/zoolu-website/media/download/' . $objFileVersion->idFiles . '/' . urlencode(str_replace('.', '-', $objFileVersion->title)) . '?v=' . $objFileVersion->version . '" target="_blank">' . $this->core->translate->_('Version') . ' ' . $objFileVersion->version . '</a> (' . $objCreated->get(Zend_Date::DATETIME_MEDIUM) . ' - ' . $objArchived->get(Zend_Date::DATETIME_MEDIUM) . ')</div>';
                 }
             }
             $strOutput .= '
                      </div>';
         }
         $strOutput .= '
                    </div>
                  </div>';
     }
     return $strOutput;
 }
開發者ID:BGCX261,項目名稱:zoolu-svn-to-git,代碼行數:101,代碼來源:ViewHelper.php


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