本文整理汇总了PHP中OldLocalFile::getTimestamp方法的典型用法代码示例。如果您正苦于以下问题:PHP OldLocalFile::getTimestamp方法的具体用法?PHP OldLocalFile::getTimestamp怎么用?PHP OldLocalFile::getTimestamp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OldLocalFile
的用法示例。
在下文中一共展示了OldLocalFile::getTimestamp方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onSuccess
public function onSuccess()
{
$timestamp = $this->oldFile->getTimestamp();
$user = $this->getUser();
$lang = $this->getLanguage();
$userDate = $lang->userDate($timestamp, $user);
$userTime = $lang->userTime($timestamp, $user);
$this->getOutput()->addWikiMsg('filerevert-success', $this->getTitle()->getText(), $userDate, $userTime, wfExpandUrl($this->page->getFile()->getArchiveUrl($this->getRequest()->getText('oldimage')), PROTO_CURRENT));
$this->getOutput()->returnToMain(false, $this->getTitle());
}
示例2: getLink
/**
* Get the link to the file.
* Overridden by RevDelArchivedFileItem.
* @return string
*/
protected function getLink()
{
$date = htmlspecialchars($this->list->getLanguage()->userTimeAndDate($this->file->getTimestamp(), $this->list->getUser()));
if (!$this->isDeleted()) {
# Regular files...
return Html::rawElement('a', ['href' => $this->file->getUrl()], $date);
}
# Hidden files...
if (!$this->canViewContent()) {
$link = $date;
} else {
$link = Linker::link(SpecialPage::getTitleFor('Revisiondelete'), $date, [], ['target' => $this->list->title->getPrefixedText(), 'file' => $this->file->getArchiveName(), 'token' => $this->list->getUser()->getEditToken($this->file->getArchiveName())]);
}
return '<span class="history-deleted">' . $link . '</span>';
}