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


PHP request\LinkHandler类代码示例

本文整理汇总了PHP中wcf\system\request\LinkHandler的典型用法代码示例。如果您正苦于以下问题:PHP LinkHandler类的具体用法?PHP LinkHandler怎么用?PHP LinkHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: execute

 /**
  * @see \wcf\system\event\listener\IParameterizedEventListener::execute()
  */
 public function execute($eventObj, $className, $eventName, array &$parameters)
 {
     if (!MODULE_CONVERSATION || !MODULE_JCOINS || JCOINS_RECEIVECOINS_ADDCONVERSATIONREPLY == 0) {
         return;
     }
     if ($eventObj->getActionName() != 'create' && $eventObj->getActionName() != 'quickReply') {
         return;
     }
     // catch 3rdparty plugins, which creates Conversations without an logged in user
     if (WCF::getUser()->userID == 0) {
         return;
     }
     $parameters = $eventObj->getParameters();
     if (isset($parameters['isFirstPost'])) {
         return;
     }
     if ($eventObj->getActionName() == 'create') {
         $return = $eventObj->getReturnValues();
         $conversation = $return['returnValues']->getConversation();
         $this->statementAction = new UserJcoinsStatementAction(array(), 'create', array('data' => array('reason' => 'wcf.jcoins.statement.conversationreplyadd.recive', 'sum' => JCOINS_RECEIVECOINS_ADDCONVERSATIONREPLY, 'additionalData' => array('title' => $conversation->subject), 'link' => $return['returnValues']->getLink()), 'changeBalance' => 1));
         $this->statementAction->validateAction();
         $this->statementAction->executeAction();
     } else {
         $conversation = new \wcf\data\conversation\Conversation(isset($parameters['objectID']) ? intval($parameters['objectID']) : 0);
         $this->statementAction = new UserJcoinsStatementAction(array(), 'create', array('data' => array('reason' => 'wcf.jcoins.statement.conversationadd.recive', 'sum' => JCOINS_RECEIVECOINS_CREATECONVERSATION, 'additionalData' => array('title' => $conversation->subject), 'link' => \wcf\system\request\LinkHandler::getInstance()->getLink('Conversation', array('object' => $conversation))), 'changeBalance' => 1));
         $this->statementAction->validateAction();
         $this->statementAction->executeAction();
     }
 }
开发者ID:jacboy,项目名称:JCoins,代码行数:32,代码来源:JCoinsConversationMessageAddListener.class.php

示例2: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // add breadcrumbs
     WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('cms.header.menu.news'), LinkHandler::getInstance()->getLink('NewsOverview', array('application' => 'cms'))));
     WCF::getBreadcrumbs()->add($this->entry->getDecoratedObject()->getBreadcrumb());
 }
开发者ID:Griborim,项目名称:de.incendium.cms.news,代码行数:10,代码来源:NewsEntryLogPage.class.php

示例3: search

 /**
  * @see	\wcf\system\search\acp\IACPSearchResultProvider::search()
  */
 public function search($query)
 {
     if (!WCF::getSession()->getPermission('admin.system.package.canUpdatePackage') && !WCF::getSession()->getPermission('admin.system.package.canUninstallPackage')) {
         return array();
     }
     $results = array();
     // search by language item
     $conditions = new PreparedStatementConditionBuilder();
     $conditions->add("languageID = ?", array(WCF::getLanguage()->languageID));
     $conditions->add("languageItem LIKE ?", array('wcf.acp.package.packageName.package%'));
     $conditions->add("languageItemValue LIKE ?", array('%' . $query . '%'));
     $sql = "SELECT\t\tlanguageItem\n\t\t\tFROM\t\twcf" . WCF_N . "_language_item\n\t\t\t" . $conditions;
     $statement = WCF::getDB()->prepareStatement($sql);
     $statement->execute($conditions->getParameters());
     $packageIDs = array();
     while ($row = $statement->fetchArray()) {
         $packageIDs[] = str_replace('wcf.acp.package.packageName.package', '', $row['languageItem']);
     }
     $conditions = new PreparedStatementConditionBuilder(false);
     if (!empty($packageIDs)) {
         $conditions->add("packageID IN (?)", array($packageIDs));
     }
     $sql = "SELECT\t*\n\t\t\tFROM\twcf" . WCF_N . "_package\n\t\t\tWHERE\tpackageName LIKE ?\n\t\t\t\tOR package LIKE ?\n\t\t\t\t" . (count($conditions->getParameters()) ? "OR " . $conditions : "");
     $statement = WCF::getDB()->prepareStatement($sql);
     $statement->execute(array_merge(array($query . '%', $query . '%'), $conditions->getParameters()));
     while ($package = $statement->fetchObject('wcf\\data\\package\\Package')) {
         $results[] = new ACPSearchResult($package->getName(), LinkHandler::getInstance()->getLink('Package', array('id' => $package->packageID, 'title' => $package->getName())));
     }
     return $results;
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:33,代码来源:PackageACPSearchResultProvider.class.php

示例4: execute

	/**
	 * @see	wcf\system\clipboard\action\IClipboardAction::execute()
	 */
	public function execute(array $objects, $actionName) {
		$item = parent::execute($objects, $actionName);
		
		if ($item === null) {
			return null;
		}
		
		// handle actions
		switch ($actionName) {
			case 'assignToGroup':
				$item->setURL(LinkHandler::getInstance()->getLink('UserAssignToGroup'));
			break;
			
			case 'delete':
				$item->addInternalData('confirmMessage', WCF::getLanguage()->getDynamicVariable('wcf.clipboard.item.com.woltlab.wcf.user.delete.confirmMessage', array(
					'count' => $item->getCount()
				)));
			break;
			
			case 'exportMailAddress':
				$item->setURL(LinkHandler::getInstance()->getLink('UserEmailAddressExport'));
			break;
			
			case 'sendMail':
				$item->setURL(LinkHandler::getInstance()->getLink('UserMail'));
			break;
		}
		
		return $item;
	}
开发者ID:0xLeon,项目名称:WCF,代码行数:33,代码来源:UserClipboardAction.class.php

示例5: getLink

 public function getLink($query = '')
 {
     if ($query) {
         return LinkHandler::getInstance()->getLink('Page', array('alias' => $this->getDecoratedObject()->getAlias(), 'application' => 'cms', 'highlight' => urlencode($query)));
     }
     return $this->getDecoratedObject()->getLink();
 }
开发者ID:knzo,项目名称:Fireball,代码行数:7,代码来源:SearchResultPage.class.php

示例6: getLink

 /**
  * @see	\wcf\data\search\ISearchResultObject::getLink()
  */
 public function getLink($query = '')
 {
     if ($query) {
         return LinkHandler::getInstance()->getLink('Conversation', array('object' => $this->getConversation(), 'messageID' => $this->messageID, 'highlight' => urlencode($query)), '#message' . $this->messageID);
     }
     return $this->getDecoratedObject()->getLink();
 }
开发者ID:wouka,项目名称:com.woltlab.wcf.conversation,代码行数:10,代码来源:SearchResultConversationMessage.class.php

示例7: execute

 /**
  * @see	wcf\system\clipboard\action\IClipboardAction::execute()
  */
 public function execute(array $objects, $actionName, $typeData = array())
 {
     $item = new ClipboardEditorItem();
     // handle actions
     switch ($actionName) {
         case 'assignToGroup':
             $item->setName('user.assignToGroup');
             $item->setURL(LinkHandler::getInstance()->getLink('UserAssignToGroup'));
             break;
         case 'delete':
             $userIDs = $this->validateDelete($objects);
             if (!count($userIDs)) {
                 return null;
             }
             $item->addInternalData('confirmMessage', WCF::getLanguage()->getDynamicVariable('wcf.clipboard.item.user.delete.confirmMessage', array('count' => count($userIDs))));
             $item->addParameter('actionName', 'delete');
             $item->addParameter('className', 'wcf\\data\\user\\UserAction');
             $item->addParameter('objectIDs', $userIDs);
             $item->setName('user.delete');
             break;
         case 'exportMailAddress':
             $item->setName('user.exportMailAddress');
             $item->setURL(LinkHandler::getInstance()->getLink('UserEmailAddressExport'));
             break;
         case 'sendMail':
             $item->setName('user.sendMail');
             $item->setURL(LinkHandler::getInstance()->getLink('UserMail'));
             break;
         default:
             throw new SystemException("action '" . $actionName . "' is invalid");
             break;
     }
     return $item;
 }
开发者ID:ZerGabriel,项目名称:WCF,代码行数:37,代码来源:UserClipboardAction.class.php

示例8: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // stats
     if (LINKLIST_ENABLE_STATISTICS) {
         $this->stats = array_merge(StatsCacheBuilder::getInstance()->getData(), UserStatsCacheBuilder::getInstance()->getData());
     }
     // get categories
     $categoryTree = new LinklistCategoryNodeTree('de.incendium.linklist.category');
     $this->categoryList = $categoryTree->getIterator();
     $this->categoryList->setMaxDepth(0);
     // get featured entries
     $this->featuredEntryList = new AccessibleEntryList();
     $this->featuredEntryList->getConditionBuilder()->add('entry.isFeatured = ?', array(1));
     $this->featuredEntryList->sqlLimit = 10;
     $this->featuredEntryList->sqlOrderBy = 'RAND()';
     $this->featuredEntryList->readObjects();
     // remove default breadcrumb entry and set current page as 'website'
     if (WCF::isLandingPage()) {
         MetaTagHandler::getInstance()->addTag('og:url', 'og:url', LinkHandler::getInstance()->getLink('Linklist', array('application' => 'linklist')), true);
         MetaTagHandler::getInstance()->addTag('og:type', 'og:type', 'website', true);
         MetaTagHandler::getInstance()->addTag('og:title', 'og:title', WCF::getLanguage()->get(PAGE_TITLE), true);
         MetaTagHandler::getInstance()->addTag('og:description', 'og:description', WCF::getLanguage()->get(PAGE_DESCRIPTION), true);
     }
 }
开发者ID:Griborim,项目名称:de.incendium.cms.linklist,代码行数:28,代码来源:LinklistPage.class.php

示例9: render

 /**
  * @see	\wcf\system\dashboard\box\AbstractContentDashboardBox::render()
  */
 protected function render()
 {
     if (count($this->eventList)) {
         $this->titleLink = LinkHandler::getInstance()->getLink('RecentActivityList');
         WCF::getTPL()->assign(array('eventList' => $this->eventList));
         return WCF::getTPL()->fetch('dashboardBoxRecentActivitySidebar');
     }
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:11,代码来源:RecentActivitySidebarDashboardBox.class.php

示例10: getLink

 /**
  * @see	\wcf\system\user\notification\event\IUserNotificationEvent::getLink()
  */
 public function getLink()
 {
     $owner = WCF::getUser();
     if ($this->additionalData['objectID'] != WCF::getUser()->userID) {
         $owner = CommentDataHandler::getInstance()->getUser($this->additionalData['objectID']);
     }
     return LinkHandler::getInstance()->getLink('User', array('object' => $owner), '#wall');
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:11,代码来源:UserProfileCommentLikeUserNotificationEvent.class.php

示例11: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // add breadcrumbs
     if (MODULE_MEMBERS_LIST) {
         WCF::getBreadcrumbs()->add(new Breadcrumb(WCF::getLanguage()->get('wcf.user.members'), LinkHandler::getInstance()->getLink('MembersList')));
     }
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:11,代码来源:TeamPage.class.php

示例12: getLink

 /**
  * @see	\wcf\system\menu\ITreeMenuItem::getLink()
  */
 public function getLink()
 {
     // external link
     if (!$this->menuItemController) {
         return $this->menuItemLink;
     }
     $this->parseController();
     return LinkHandler::getInstance()->getLink($this->controller, array('application' => $this->application), $this->menuItemLink);
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:12,代码来源:UserMenuItem.class.php

示例13: save

 /**
  * @see	\wcf\form\IForm::save()
  */
 public function save()
 {
     parent::save();
     WCF::getSession()->register('disclaimerAccepted', true);
     $this->saved();
     WCF::getSession()->update();
     HeaderUtil::redirect(LinkHandler::getInstance()->getLink('Register'));
     exit;
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:12,代码来源:DisclaimerForm.class.php

示例14: getLink

 /**
  * @see wcf\system\menu\ITreeMenuItem::getLink()
  */
 public function getLink()
 {
     $abbreviation = ApplicationHandler::getInstance()->getAbbreviation($this->packageID);
     $parameters = array();
     if ($abbreviation) {
         $parameters['application'] = $abbreviation;
     }
     return LinkHandler::getInstance()->getLink(null, $parameters, $this->menuItemLink);
 }
开发者ID:ZerGabriel,项目名称:WCF,代码行数:12,代码来源:PageMenuItem.class.php

示例15: render

 /**
  * @see	\wcf\system\dashboard\box\AbstractContentDashboardBox::render()
  */
 protected function render()
 {
     if (empty($this->usersOnlineList) || !count($this->usersOnlineList->getObjects())) {
         return '';
     }
     $this->titleLink = LinkHandler::getInstance()->getLink('UsersOnlineList');
     WCF::getTPL()->assign(array('usersOnlineList' => $this->usersOnlineList));
     return WCF::getTPL()->fetch('dashboardBoxUsersOnlineSidebar');
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:12,代码来源:UsersOnlineSidebarDashboardBox.class.php


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