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


PHP caNavUrl函数代码示例

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


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

示例1: Delete

 public function Delete()
 {
     $ps_mode = $this->request->getParameter('mode', pString);
     $va_errors = array();
     $pa_watch_ids = $this->request->getParameter('watch_id', pArray);
     $va_errors = array();
     if (is_array($pa_watch_ids) && sizeof($pa_watch_ids) > 0) {
         $t_watch_list = new ca_watch_list();
         foreach ($pa_watch_ids as $vn_watch_id) {
             if ($t_watch_list->load(array('watch_id' => $vn_watch_id))) {
                 $t_watch_list->setMode(ACCESS_WRITE);
                 $t_watch_list->delete();
                 if ($t_watch_list->numErrors()) {
                     $va_errors = $t_item->errors;
                 }
             }
         }
         if (sizeof($va_errors) > 0) {
             $this->notification->addNotification(implode("; ", $va_errors), __NOTIFICATION_TYPE_ERROR__);
         } else {
             $this->notification->addNotification(_t("Your watched items have been deleted"), __NOTIFICATION_TYPE_INFO__);
         }
     } else {
         $this->notification->addNotification(_t("Please use the checkboxes to select items to remove from your watch list"), __NOTIFICATION_TYPE_WARNING__);
     }
     if ($ps_mode == "dashboard") {
         $this->response->setRedirect(caNavUrl($this->request, "", "Dashboard", "Index"));
     } else {
         $this->ListItems();
     }
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:31,代码来源:WatchedItemsController.php

示例2: recentlyAdded

 function recentlyAdded()
 {
     // redirect user if not logged in
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn() || $this->request->config->get('show_bristol_only') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form"));
     } elseif ($this->request->config->get('show_bristol_only') && $this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "bristol", "Show", "Index"));
     }
     $t_object = new ca_objects();
     $va_recently_added_objects = $t_object->getRecentlyAddedItems(25, array('checkAccess' => caGetUserAccessValues($this->request)));
     $va_entries = array();
     $va_object_ids = array();
     foreach ($va_recently_added_objects as $va_object) {
         $va_object_ids[] = $va_object['object_id'];
     }
     $va_labels = $t_object->getPreferredDisplayLabelsForIDs($va_object_ids);
     // TODO: Need to get object descriptions and last update times properly
     foreach ($va_labels as $vn_object_id => $vs_label) {
         $va_entries[] = array('title' => $vs_label, 'link' => $vs_link = $this->request->config->get('site_host') . caNavUrl($this->request, '', 'Detail/Object', 'Index', array('object_id' => $vn_object_id)), 'guid' => $vs_link, 'lastUpdate' => time(), 'description' => '', 'pubDate' => time());
     }
     $va_feed_data = array('title' => _t('Recently added'), 'link' => $this->request->getRequestUrl(true), 'charset' => 'UTF-8', 'entries' => $va_entries);
     $o_feed = Zend_Feed::importArray($va_feed_data, 'rss');
     $this->view->setVar('feed', $o_feed);
     $this->render('Feed/feed_recently_added_xml.php');
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:25,代码来源:FeedController.php

示例3: __construct

 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     $this->ops_theme = __CA_THEME__;
     // get current theme
     if (!is_dir(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views')) {
         // if theme is not defined for this plugin, try to use "default" theme
         $this->ops_theme = 'default';
     }
     parent::__construct($po_request, $po_response, array(__CA_APP_DIR__ . '/plugins/eastend/themes/' . $this->ops_theme . '/views'));
     MetaTagManager::addLink('stylesheet', $po_request->getBaseUrlPath() . "/app/plugins/eastend/themes/" . $this->ops_theme . "/css/eastend.css", 'text/css');
     $this->opo_plugin_config = Configuration::load($this->request->getAppConfig()->get('application_plugins') . '/eastend/conf/eastend.conf');
     if (!(bool) $this->opo_plugin_config->get('enabled')) {
         die(_t('eastend plugin is not enabled'));
     }
     // redirect user if not logged in
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form"));
     }
     $po_request->session->setVar('pawtucket2_browse_target', "ca_objects");
     if ($this->request->config->get("dont_enforce_access_settings")) {
         $this->opa_access_values = array();
     } else {
         $this->opa_access_values = caGetUserAccessValues($this->request);
     }
     $this->view->setVar('access_values', $va_access_values);
     $this->opo_result_context = new ResultContext($po_request, $this->ops_tablename, $this->ops_find_type);
     $this->opo_result_context->setAsLastFind();
     $this->opo_browse = new ObjectBrowse($x = $this->opo_result_context->getSearchExpression());
     $this->view->setvar("browse_place_ids", $this->opo_plugin_config->get('artist_browser_place_ids'));
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:30,代码来源:MapController.php

示例4: render

 /**
  * Generate timeline output in specified format
  *
  * @param array $pa_viz_settings Array of visualization settings taken from visualization.conf
  * @param string $ps_format Specifies format to generate output in. Currently only 'HTML' is supported.
  * @param array $pa_options Array of options to use when rendering output. Supported options are:
  *		width =
  *		height =
  *		request = current request; required for generation of editor links
  */
 public function render($pa_viz_settings, $ps_format = 'HTML', $pa_options = null)
 {
     if (!($vo_data = $this->getData())) {
         return null;
     }
     $this->opn_num_items_rendered = 0;
     $po_request = isset($pa_options['request']) && $pa_options['request'] ? $pa_options['request'] : null;
     if (!$po_request) {
         return '';
     }
     list($vs_width, $vs_height) = $this->_parseDimensions(caGetOption('width', $pa_options, 500), caGetOption('height', $pa_options, 500));
     // Calculate how many items will be rendered on the timeline
     // from the entire data set
     $qr_res = $this->getData();
     while ($qr_res->nextHit()) {
         foreach ($pa_viz_settings['sources'] as $vs_source_name => $va_source) {
             if ($qr_res->get($va_source['data'])) {
                 $this->opn_num_items_rendered++;
             }
         }
         if ($this->opn_num_items_rendered >= 100) {
             break;
         }
     }
     $vs_buf = $this->getLocaleJSSrc($po_request) . "\n\t<div id='timeline-embed' style='width: {$vs_width}; height: {$vs_height};'></div>\n    <script type='text/javascript'>\n\t\tjQuery(document).ready(function() {\n\t\t\tcreateStoryJS({\n\t\t\t\ttype:       'timeline',\n\t\t\t\twidth:      '{$vs_width}',\n\t\t\t\theight:     '{$vs_height}',\n\t\t\t\tsource:     '" . caNavUrl($po_request, '*', '*', '*', array('renderData' => '1', 'viz' => $pa_viz_settings['code'])) . "',\n\t\t\t\tembed_id:   'timeline-embed'\n\t\t\t});\n\t\t});\n\t</script>\n";
     return $vs_buf;
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:37,代码来源:TimelineJS.php

示例5: __construct

 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     parent::__construct($po_request, $po_response, $pa_view_paths);
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn() || $this->request->config->get('show_bristol_only') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form"));
     }
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:7,代码来源:AboutController.php

示例6: recentlyAdded

 function recentlyAdded()
 {
     // redirect user if not logged in
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn() || $this->request->config->get('show_bristol_only') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form"));
     } elseif ($this->request->config->get('show_bristol_only') && $this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "bristol", "Show", "Index"));
     }
     $t_object = new ca_objects();
     if (($vn_num_items = (int) $this->request->config->get('rss_number_of_items')) <= 0) {
         $vn_num_items = 10;
     }
     $va_recently_added_objects = $t_object->getRecentlyAddedItems($vn_num_items, array('checkAccess' => caGetUserAccessValues($this->request)));
     $va_entries = array();
     $va_object_ids = array();
     foreach ($va_recently_added_objects as $va_object) {
         $va_object_ids[] = $va_object['object_id'];
     }
     $qr_res = $t_object->makeSearchResult('ca_objects', $va_object_ids);
     $vs_description_bundle = $this->request->config->get('rss_description');
     while ($qr_res->nextHit()) {
         $vn_object_id = $qr_res->get('ca_objects.object_id');
         if (!($vn_creation_time = $t_object->getCreationTimestamp($vn_object_id, array('timestampOnly' => true)))) {
             $vn_creation_time = time();
         }
         if (!($vn_update_time = $t_object->getLastChangeTimestamp($vn_object_id, array('timestampOnly' => true)))) {
             $vn_update_time = time();
         }
         $va_entries[] = array('title' => $qr_res->get('ca_objects.preferred_labels.name'), 'link' => $vs_link = $this->request->config->get('site_host') . caNavUrl($this->request, '', 'Detail/Object', 'Index', array('object_id' => $vn_object_id)), 'guid' => $vs_link, 'lastUpdate' => $vn_update_time, 'description' => $vs_description_bundle ? $qr_res->getMediaTag("ca_object_representations.media", "preview") . "\n" . $qr_res->get($vs_description_bundle) : '', 'pubDate' => $vn_creation_time);
     }
     $va_feed_data = array('title' => _t('Recently added'), 'link' => $this->request->getRequestUrl(true), 'charset' => 'UTF-8', 'entries' => $va_entries);
     $o_feed = Zend_Feed::importArray($va_feed_data, 'rss');
     $this->view->setVar('feed', $o_feed);
     $this->render('Feed/feed_recently_added_xml.php');
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:35,代码来源:FeedController.php

示例7: __construct

 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     parent::__construct($po_request, $po_response, $pa_view_paths);
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "LoginForm"));
     }
     caSetPageCSSClasses(array("rolodex"));
 }
开发者ID:ffarago,项目名称:pawtucket2,代码行数:8,代码来源:SearchController.php

示例8: __construct

 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     parent::__construct($po_request, $po_response, $pa_view_paths);
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "LoginForm"));
     }
     $this->opa_access_values = caGetUserAccessValues($po_request);
     caSetPageCSSClasses(array("listing"));
 }
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:9,代码来源:ListingController.php

示例9: __construct

 /**
  *
  */
 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     parent::__construct($po_request, $po_response, $pa_view_paths);
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "LoginForm"));
     }
     caSetPageCSSClasses(array("multisearch"));
     MetaTagManager::setWindowTitle($this->request->config->get("app_display_name") . ": " . _t("Search") . ": " . $this->request->getParameter('search', pString));
 }
开发者ID:ffarago,项目名称:pawtucket2,代码行数:12,代码来源:MultiSearchController.php

示例10: __construct

 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     parent::__construct($po_request, $po_response, $pa_view_paths);
     $this->config = caGetFrontConfig();
     caSetPageCSSClasses(array("front"));
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "LoginForm"));
     }
     MetaTagManager::setWindowTitle($this->request->config->get("app_display_name"));
 }
开发者ID:ffarago,项目名称:pawtucket2,代码行数:10,代码来源:FrontController.php

示例11: __construct

 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     parent::__construct($po_request, $po_response, $pa_view_paths);
     // redirect user if not logged in
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form"));
     }
     $this->opa_views = array('thumbnail' => _t('Thumbnails'), 'full' => _t('List'));
     $this->opa_sorts = array('ca_object_labels.name' => _t('title'), 'ca_objects.type_id' => _t('type'), 'ca_objects.idno' => _t('idno'));
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:10,代码来源:LandingController.php

示例12: __construct

 /**
  *
  */
 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     parent::__construct($po_request, $po_response, $pa_view_paths);
     if (!$this->request->isAjax() && $this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "LoginForm"));
     }
     $this->opa_access_values = caGetUserAccessValues($po_request);
     $this->view->setVar("access_values", $this->opa_access_values);
     $this->view->setVar("find_type", $this->ops_find_type);
     caSetPageCSSClasses(array("browse", "results"));
 }
开发者ID:ffarago,项目名称:pawtucket2,代码行数:14,代码来源:BrowseController.php

示例13: Show

 /**
  * Displays the basic info for an object
  */
 public function Show($pa_options = null)
 {
     JavascriptLoadManager::register('panel');
     parent::Show($pa_options);
     // redirect user if not logged in
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn() || $this->request->config->get('show_bristol_only') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form"));
     } elseif ($this->request->config->get('show_bristol_only') && $this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "bristol", "Show", "Index"));
     }
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:14,代码来源:ObjectController.php

示例14: Index

 /**
  * Displays map of all member inst
  */
 public function Index()
 {
     $o_search = new EntitySearch();
     #$o_search->setTypeRestrictions(array($this->opn_member_institution_id));
     $o_search->addResultFilter("ca_entities.access", "IN", join(',', $this->opa_access_values));
     //$qr_res = $o_search->search("*", array('sort' => 'ca_entity_labels.name', 'sort_direction' => 'asc'));
     $qr_res = $o_search->search("ca_entities.type_id:" . $this->opn_member_institution_id);
     // This is fastest
     $o_map = new GeographicMap(900, 500, 'map');
     $va_map_stats = $o_map->mapFrom($qr_res, "georeference", array("ajaxContentUrl" => caNavUrl($this->request, "NovaMuse", "MemberMap", "getMapItemInfo"), "request" => $this->request, "checkAccess" => $this->opa_access_values));
     $this->view->setVar("map", $o_map->render('HTML', array('delimiter' => "<br/>")));
     $this->render('member_map_html.php');
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:16,代码来源:MemberMapController.php

示例15: __construct

 public function __construct(&$po_request, &$po_response, $pa_view_paths = null)
 {
     parent::__construct($po_request, $po_response, $pa_view_paths);
     // redirect user if not logged in
     if ($this->request->config->get('pawtucket_requires_login') && !$this->request->isLoggedIn()) {
         $this->response->setRedirect(caNavUrl($this->request, "", "LoginReg", "form"));
     }
     $t_list = new ca_lists();
     $pn_type_restriction_id = $t_list->getItemIDFromList('occurrence_types', 'chronology');
     // set type restrictions for searches
     $o_search_result_context = new ResultContext($this->request, "ca_occurrences", 'basic_search');
     $o_search_result_context->setTypeRestriction($pn_type_restriction_id);
     $o_search_result_context->saveContext();
 }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:14,代码来源:ChronologyController.php


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