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


PHP Fox::getUrl方法代码示例

本文整理汇总了PHP中Fox::getUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Fox::getUrl方法的具体用法?PHP Fox::getUrl怎么用?PHP Fox::getUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Fox的用法示例。


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

示例1: _prepareContainer

 /**
  * Prepare container
  */
 protected function _prepareContainer()
 {
     parent::_prepareContainer();
     $this->setIsEditButtonEnabled(FALSE);
     $this->setIsSaveButtonEnabled(FALSE);
     $this->setIsResetButtonEnabled(FALSE);
     $this->addButton(array('name' => 'reply', 'id' => 'reply', 'button_text' => 'Reply', 'style_class' => 'form-button', 'icon_class' => 'save', 'url' => Fox::getUrl('*/*/reply', array('id' => $this->getRequest()->getParam('id')))));
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:11,代码来源:View.php

示例2: getDeleteButtonUrl

 /**
  * Get delete button action url
  * 
  * @return string
  */
 public function getDeleteButtonUrl()
 {
     $url = '';
     $id = $this->getRequest()->getParam('id', FALSE);
     if ($id) {
         $url = Fox::getUrl('*/*/delete', array('id' => $id));
     }
     return $url;
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:14,代码来源:Edit.php

示例3: _prepareContainer

 /**
  * Prepare container
  */
 protected function _prepareContainer()
 {
     if (Fox::getModel('extensionmanager/session')->getFormData()) {
         $this->editing = true;
         $this->addButton(array("type" => "button", "button_text" => "Generate Package", "url" => $this->getUrl("*/*/generate-package"), "style_class" => "form-button", "confirm" => true, "confirm_text" => "Unsaved changes to package may lost."));
     }
     $this->deleteButtonUrl = Fox::getUrl("*/*/delete");
     $this->setIsDeleteButtonEnabled(TRUE);
     parent::_prepareContainer();
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:13,代码来源:Add.php

示例4: groupStatusAction

 /**
  * Bulk status update action
  */
 public function groupStatusAction()
 {
     try {
         $model = Fox::getModel('core/cache');
         $codes = $this->getGroupActionIds($model);
         $totalIds = count($codes);
         $updateType = '';
         $dependentParams = $this->getRequest()->getParam('dependents', array());
         if (isset($dependentParams['status'])) {
             if ($dependentParams['status'] == Fox_Core_Model_Cache::STATUS_CLEAR) {
                 $updateType = 'cleared';
                 if (in_array(Fox_Core_Model_Cache::CACHE_CODE_PREFERENCE, $codes)) {
                     Uni_Core_Preferences::loadPreferences(TRUE);
                     Fox::initializePreferences();
                 }
                 if (in_array(Fox_Core_Model_Cache::CACHE_CODE_LAYOUT, $codes)) {
                     Uni_Core_CacheManager::clearLayoutCache();
                 }
             } else {
                 if ($dependentParams['status'] == Fox_Core_Model_Cache::STATUS_ENABLED) {
                     $updateType = 'enabled';
                 } else {
                     if ($dependentParams['status'] == Fox_Core_Model_Cache::STATUS_DISABLED) {
                         $updateType = 'disabled';
                     }
                 }
                 $cacheCodes = '\'' . implode('\',\'', $codes) . '\'';
                 $model->update(array('status' => $dependentParams['status']), 'cache_code IN (' . $cacheCodes . ')');
             }
             Uni_Core_CacheManager::createCacheSettings();
             Fox::getHelper('core/message')->setInfo('Total ' . $totalIds . ' cache(s) successfully ' . $updateType . '.');
         }
     } catch (Exception $e) {
         Fox::getHelper('core/message')->setError($e->getMessage());
     }
     echo Zend_Json_Encoder::encode(array('redirect' => Fox::getUrl('*/*/')));
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:40,代码来源:CacheController.php

示例5: getAction

 /**
  * Get admin actions
  * 
  * @return array
  */
 public function getAction()
 {
     return array('send_newsletter' => Fox::getUrl('*/*/send', array('id' => $this->getId())), 'preview_url' => Fox::getUrl('*/admin_template/preview', array('tId' => $this->getId())));
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:9,代码来源:Template.php

示例6: groupDeleteAction

 /**
  * Bulk delete action
  */
 public function groupDeleteAction()
 {
     try {
         $model = Fox::getModel('backup/backup');
         $ids = $this->getGroupActionIds($model);
         $totalIds = count($ids);
         $filePath = Fox::getUploadDirectoryPath() . DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR . Fox_Backup_Model_Backup::BACKUP_PATH . DIRECTORY_SEPARATOR;
         if ($totalIds) {
             foreach ($ids as $d) {
                 $model->load($d);
                 @unlink($filePath . $model->getFileName());
                 $model->unSetData();
             }
             $model->delete($model->getPrimaryField() . ' IN (' . implode(',', $ids) . ')');
         }
         Fox::getHelper('core/message')->setInfo('Total ' . $totalIds . ' record(s) successfully deleted.');
     } catch (Exception $e) {
         Fox::getHelper('core/message')->setError($e->getMessage());
     }
     echo Zend_Json_Encoder::encode(array('redirect' => Fox::getUrl('*/*/')));
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:24,代码来源:BackupController.php

示例7: getSubscriberPostUrl

 /**
  * Get Subscription post url
  * 
  * @return string
  */
 function getSubscriberPostUrl()
 {
     return Fox::getUrl('newsletter/subscriber/subscribe');
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:9,代码来源:Subscriber.php

示例8: createMenu

 /**
  * Create menu html
  * 
  * @param DOMElement $menu
  */
 private function createMenu($menu)
 {
     $sourceQueue = array($menu);
     $targetQueue = array($this->mnuRoot);
     while (count($sourceQueue) > 0) {
         $menu = array_shift($sourceQueue);
         $parent = array_shift($targetQueue);
         if ($mChs = $this->getSortedNodes($menu->childNodes)) {
             foreach ($mChs as $mCh) {
                 if ($mCh->nodeName == 'item') {
                     $node = Uni_Data_XDOMDocument::createNode('li', NULL, $this->mnuDoc);
                     $link = Uni_Data_XDOMDocument::createNode('a', array('href' => Fox::getUrl($mCh->getAttribute('action'))), $this->mnuDoc);
                     $link->appendChild($this->mnuDoc->createTextNode($mCh->nodeValue));
                     $node->appendChild($link);
                     $parent->appendChild($node);
                 } else {
                     if ($mCh->nodeName == 'menu') {
                         $label = $mCh->getAttribute('label');
                         $li = Uni_Data_XDOMDocument::createNode('li', NULL, $this->mnuDoc);
                         $parent->appendChild($li);
                         $span = Uni_Data_XDOMDocument::createNode('a', array('href' => '#'), $this->mnuDoc);
                         $span->appendChild($this->mnuDoc->createTextNode($label));
                         $li->appendChild($span);
                         $ul = Uni_Data_XDOMDocument::createNode('ul', NULL, $this->mnuDoc);
                         $ul->appendChild($this->mnuDoc->createTextNode(''));
                         $li->appendChild($ul);
                         $targetQueue[] = $ul;
                         $sourceQueue[] = $mCh;
                     }
                 }
             }
         }
     }
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:39,代码来源:Navigation.php

示例9: getAnalyticsSettingUrl

 /**
  * Returns url of google analytics setting
  *
  * @return string
  */
 public function getAnalyticsSettingUrl()
 {
     return Fox::getUrl('admin/system_setting/edit', array('item' => 'admin', 'lbl' => 'Admin'));
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:9,代码来源:Dashboard.php

示例10: forgetPasswordAction

 /**
  * Forget password action
  * 
  * Sends an email with link to user which redirects to change password interface
  */
 public function forgetPasswordAction()
 {
     if (Fox::getModel('admin/session')->getLoginData()) {
         $this->sendRedirect('*/dashboard/');
     }
     if ($this->getRequest()->isPost()) {
         try {
             $data = $this->getRequest()->getPost();
             $model = Fox::getModel('admin/user');
             $model->load($data['username'], 'username');
             if ($model->getId()) {
                 $code = strtolower(substr(md5(time() * mt_rand()), 0, 20));
                 $modelSetCode = Fox::getModel('admin/forgetPassword');
                 $modelSetCode->load($model->getId(), 'user_id');
                 $modelSetCode->setUserId($model->getId());
                 $modelSetCode->setCode($code);
                 $modelSetCode->setCreatedOn(Fox_Core_Model_Date::getCurrentDate('Y-m-d H:i:s'));
                 $modelSetCode->save();
                 Fox::getHelper('core/message')->setInfo('Change Password link has been sent to your email id.');
                 try {
                     $modelTemplate = Fox::getModel('core/email/template');
                     $sender = Fox::getPreference('admin/password/forgot_email_sender');
                     $template = Fox::getPreference('admin/password/forgot_email_template');
                     $modelTemplate->sendTemplateMail($template, $model->getEmail(), $sender, array('name' => $model->getFirstname(), 'link' => Fox::getUrl('*/*/change-password', array('user_id' => $model->getId(), 'code' => $code))));
                 } catch (Exception $e) {
                 }
                 $this->sendRedirect('*/*/');
             } else {
                 throw new Exception('Invalid username was given.');
             }
         } catch (Exception $e) {
             Fox::getHelper('core/message')->setError($e->getMessage());
         }
     }
     $this->loadLayout();
     $this->renderLayout();
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:42,代码来源:IndexController.php

示例11: getMenu

 /**
  * Get menu html
  * 
  * @param string $key Menu group key
  * @return string 
  */
 public function getMenu($key)
 {
     $menuHTML = '';
     $cacheSettings = Uni_Core_CacheManager::loadCacheSettings();
     $isCacheEnabled = isset($cacheSettings[Fox_Core_Model_Cache::CACHE_CODE_LAYOUT]) ? $cacheSettings[Fox_Core_Model_Cache::CACHE_CODE_LAYOUT] : FALSE;
     $package = Fox::getPreference(Uni_Controller_Action::MODE_ADMIN . '/package');
     $theme = Fox::getPreference(Uni_Controller_Action::MODE_ADMIN . '/theme');
     $cacheMenuBasePath = CACHE_DIR . DIRECTORY_SEPARATOR . Fox_Core_Model_Cache::CACHE_CODE_LAYOUT . DIRECTORY_SEPARATOR . Uni_Controller_Action::MODE_WEB . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR . $theme . DIRECTORY_SEPARATOR . self::CACHE_MENU_FOLDER;
     file_exists($cacheMenuBasePath) && is_dir($cacheMenuBasePath) || mkdir($cacheMenuBasePath, 0777, TRUE);
     $cacheMenuPath = $cacheMenuBasePath . DIRECTORY_SEPARATOR . $key . '.menu';
     if ($isCacheEnabled && file_exists($cacheMenuPath)) {
         $cacheMenuDoc = new DOMDocument();
         $cacheMenuDoc->loadHTMLFile($cacheMenuPath);
         $menuHTML = $cacheMenuDoc->saveXML();
         unset($cacheMenuDoc);
     } else {
         $menuGroupModel = Fox::getModel('navigation/menugroup');
         $menuGroupModel->load($key, 'key');
         if ($menuGroupModel->getId() && $menuGroupModel->getStatus() == Fox_Navigation_Model_Menugroup::STATUS_ENABLED) {
             $menuModel = Fox::getModel('navigation/menu');
             $menuList = $menuModel->getMenuItemsByGroup($key);
             $mnuDoc = new DOMDocument();
             $mnuDoc->formatOutput = true;
             $mnuRoot = NULL;
             if (count($menuList)) {
                 $mnuRoot = Uni_Data_XDOMDocument::createNode(self::ROOT_TAG, array('class' => 'menu_container'), $mnuDoc);
                 $mnuDoc->appendChild($mnuRoot);
                 foreach ($menuList as $menu) {
                     $node = Uni_Data_XDOMDocument::createNode(self::LEAF_TAG, array('class' => 'menu_nav' . ($menu['style_class'] ? ' ' . $menu['style_class'] : '')), $mnuDoc);
                     if (strpos($menu['link'], 'http://', 0) === 0 || strpos($menu['link'], 'https://', 0) === 0) {
                         $link = $menu['link'];
                     } else {
                         $link = Fox::getUrl($menu['link']);
                     }
                     $link = Uni_Data_XDOMDocument::createNode('a', array('href' => $link, 'target' => $menu['open_window'], 'class' => $menu['style_class']), $mnuDoc);
                     $link->appendChild($mnuDoc->createTextNode($menu['title']));
                     $node->appendChild($link);
                     $mnuRoot->appendChild($node);
                 }
             }
             if (isset($mnuDoc)) {
                 $menuHTML = $mnuDoc->saveXML($mnuRoot);
                 if ($isCacheEnabled) {
                     $mnuDoc->saveHTMLFile($cacheMenuPath);
                     @chmod($cacheMenuPath, 0777);
                 }
             }
             unset($mnuDoc);
         }
     }
     return $menuHTML;
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:58,代码来源:Menu.php

示例12: preDispatch

 /**
  * Controller predispatch method
  * 
  * Called before action method
  */
 function preDispatch()
 {
     parent::preDispatch();
     if (!Fox::getModel('admin/session')->getLoginData()) {
         if (!('admin' === strtolower($this->getRequest()->getModuleName()) && 'index' === strtolower($this->getRequest()->getControllerName()) && 'index' === strtolower($this->getRequest()->getActionName())) && !('admin' === strtolower($this->getRequest()->getModuleName()) && 'index' === strtolower($this->getRequest()->getControllerName()) && 'change-password' === strtolower($this->getRequest()->getActionName())) && !('admin' === strtolower($this->getRequest()->getModuleName()) && 'index' === strtolower($this->getRequest()->getControllerName()) && 'forget-password' === strtolower($this->getRequest()->getActionName())) && !('admin' === strtolower($this->getRequest()->getModuleName()) && 'index' === strtolower($this->getRequest()->getControllerName()) && 'logout' === strtolower($this->getRequest()->getActionName()))) {
             setcookie('requested_uri', $this->getRequestUriAfterBaseUrl(), time() + 3600 * 24, $this->getFrontController()->getBaseUrl());
             if ($this->getRequest()->getParam('isAjax', FALSE)) {
                 echo '<script type="text/javascript">window.location.reload();</script>';
                 exit;
             } else {
                 $this->sendRedirect('admin');
             }
         }
     } else {
         if (isset($_COOKIE['requested_uri'])) {
             $redirect = $_COOKIE['requested_uri'];
             $path = explode('/', $redirect);
             if (count($path) == 3 && !$path[2]) {
                 $redirect = $redirect . 'index';
             } else {
                 if (count($path) == 2) {
                     if (!$path[1]) {
                         $redirect .= 'index';
                     }
                     $redirect = $redirect . '/index';
                 } else {
                     if (count($path) == 1) {
                         $redirect = $redirect . '/index/index';
                     }
                 }
             }
             $paths = explode('/', $redirect);
             $moduleName = $paths[0];
             $controllerName = strtolower($paths[1]);
             $actionName = strtolower($paths[2]);
             setcookie('requested_uri', '', time() - 3600 * 24, $this->getFrontController()->getBaseUrl());
             if (!('admin' === $moduleName && 'access-denied' === $controllerName && $actionName === 'index') && !('admin' === $moduleName && 'index' === $controllerName && 'logout' === $actionName) && !Fox::getHelper('admin/acl')->isAllowed($moduleName . '/' . $controllerName . '/' . $actionName)) {
                 if ($this->getRequest()->getParam('isAjax', FALSE)) {
                     echo '<script type="text/javascript">window.location.href=' . Fox::getUrl('*/access-denied/') . ';</script>';
                     exit;
                 } else {
                     $this->sendRedirect('*/access-denied/');
                 }
             } else {
                 $this->sendRedirect($redirect);
             }
         } else {
             $moduleName = strtolower($this->getRequest()->getModuleName());
             $controllerName = strtolower($this->getRequest()->getControllerName());
             $actionName = strtolower($this->getRequest()->getActionName());
             if (!('admin' === $moduleName && 'access-denied' === $controllerName && $actionName === 'index') && !('admin' === $moduleName && 'index' === $controllerName && 'logout' === $actionName) && !Fox::getHelper('admin/acl')->isAllowed($moduleName . '/' . $controllerName . '/' . $actionName)) {
                 if ($this->getRequest()->getParam('isAjax', FALSE)) {
                     echo '<script type="text/javascript">window.location.href=\'' . Fox::getUrl('*/access-denied/') . '\';</script>';
                     exit;
                 } else {
                     $this->sendRedirect('*/access-denied/');
                 }
             }
         }
     }
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:66,代码来源:Action.php

示例13: groupUnsubscribeAction

 /**
  * Bulk unsubscribe action
  */
 public function groupUnsubscribeAction()
 {
     try {
         $model = Fox::getModel('newsletter/subscriber');
         $ids = $this->getGroupActionIds($model);
         $totalIds = count($ids);
         $count = 0;
         if ($totalIds) {
             for ($i = 0; $i < $totalIds; $i++) {
                 $model->load($ids[$i]);
                 if ($model->getId() && $model->unsubscribe()) {
                     $count++;
                 }
                 $model->unsetData();
             }
             Fox::getHelper('core/message')->setInfo('Total ' . $count . ' record(s) successfully unsubscribed.');
         }
     } catch (Exception $e) {
         Fox::getHelper('core/message')->setError($e->getMessage());
     }
     echo Zend_Json_Encoder::encode(array('redirect' => Fox::getUrl('*/*/')));
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:25,代码来源:SubscriberController.php

示例14: getMenuMarkup

 /**
  * @return string the XML, or false if an error occurred
  */
 function getMenuMarkup()
 {
     $menuQueue = array();
     $menuTree = new Uni_Data_XDOMDocument();
     $root = Uni_Data_XDOMDocument::createNode('div', array('id' => 'setting-menu', 'class' => 'accordion'), $menuTree);
     $xPath = new DOMXPath($this->finalMenuTree);
     $menus = $xPath->query('/settings/menu');
     $menus = $this->getSortedNodes($menus);
     foreach ($menus as $menu) {
         $h3 = Uni_Data_XDOMDocument::createNode('h3', array('class' => 'accordion-header'), $menuTree);
         $a = Uni_Data_XDOMDocument::createNode('a', array('href' => '#'), $menuTree);
         $a->appendChild($menuTree->createTextNode($menu->getAttribute('label')));
         $h3->appendChild($a);
         $div = Uni_Data_XDOMDocument::createNode('div', array('class' => 'accordion-content'), $menuTree);
         $ul = Uni_Data_XDOMDocument::createNode('ul', NULL, $menuTree);
         $div->appendChild($ul);
         $root->appendChild($h3);
         $root->appendChild($div);
         $menuQueue[$menu->getAttribute('name')] = $ul;
     }
     $items = $xPath->query('/settings/item');
     $items = $this->getSortedNodes($items);
     foreach ($items as $item) {
         $li = Uni_Data_XDOMDocument::createNode('li', NULL, $menuTree);
         $a = Uni_Data_XDOMDocument::createNode('a', array('href' => Fox::getUrl('admin/system_setting/edit', array('item' => $item->getAttribute('name'), 'lbl' => urlencode($item->getAttribute('label'))))), $menuTree);
         $a->appendChild($menuTree->createTextNode($item->getAttribute('label')));
         $li->appendChild($a);
         if ($parent = $menuQueue[$item->getAttribute('menu')]) {
             $parent->appendChild($li);
         }
     }
     return $menuTree->saveXML($root);
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:36,代码来源:Config.php

示例15: getConfigureUrl

 /**
  * Get url for database configuration form
  * 
  * @return string
  */
 public function getConfigureUrl()
 {
     return Fox::getUrl('*/wizard/configure-post');
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:9,代码来源:Installer.php


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