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


PHP menu_execute_active_handler函数代码示例

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


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

示例1: handle

 /**
  * {@inheritdoc}
  *
  * @api
  */
 public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true)
 {
     if (false === $this->booted) {
         $this->boot();
     }
     return menu_execute_active_handler();
 }
开发者ID:bangpound,项目名称:drupal-bundle,代码行数:12,代码来源:PseudoKernel.php

示例2: callbackAction

 /**
  * @param  null                                                                    $path
  * @param  bool                                                                    $deliver
  * @return object|Response
  * @Route("/{path}", name="controller", defaults={"deliver" = true}, requirements={"path" = ".+"})
  * @throws \Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException
  * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
  * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
  */
 public function callbackAction($path = null, $deliver = true)
 {
     menu_set_active_item($path);
     $page_callback_result = menu_execute_active_handler($path, $deliver);
     if (is_int($page_callback_result)) {
         switch ($page_callback_result) {
             case MENU_NOT_FOUND:
                 // Print a 404 page.
                 throw new NotFoundHttpException();
                 break;
             case MENU_ACCESS_DENIED:
                 // Print a 403 page.
                 throw new AccessDeniedHttpException();
                 break;
             case MENU_SITE_OFFLINE:
                 // Print a 503 page.
                 throw new ServiceUnavailableHttpException();
                 break;
         }
     } elseif (!$deliver) {
         $content = drupal_render($page_callback_result);
         return new Response($content);
     } else {
         $response = $this->get('bangpound_drupal.response');
         $response->setContent($page_callback_result);
         return $response;
     }
 }
开发者ID:bangpound,项目名称:drupal-bundle,代码行数:37,代码来源:PageController.php

示例3: setUp

 function setUp()
 {
     // simulate that drupal is serving a webpage. False indicates that we don't actually print html.
     // this is required to gather all drupal css & js files.
     $page = menu_execute_active_handler('node', FALSE);
     $this->html_page = drupal_render_page($page);
 }
开发者ID:nyl-auster,项目名称:meghann,代码行数:7,代码来源:foundation_Test.php

示例4: drupal_page_header

<?php

// $Id: index.php,v 1.82.4.1 2006/10/18 20:14:08 killes Exp $
/**
 * @file
 * The PHP page that serves all page requests on a Drupal installation.
 *
 * The routines here dispatch control to the appropriate handler, which then
 * prints the appropriate page.
 */
include_once 'includes/bootstrap.inc';
drupal_page_header();
include_once 'includes/common.inc';
fix_gpc_magic();
/*
Disabled by AstBill Team - Uvaraj 
Not compatible med AstBill. 
Fix to come soon.*/
//drupal_check_token();
$status = menu_execute_active_handler();
switch ($status) {
    case MENU_NOT_FOUND:
        drupal_not_found();
        break;
    case MENU_ACCESS_DENIED:
        drupal_access_denied();
        break;
}
drupal_page_footer();
开发者ID:BackupTheBerlios,项目名称:astbill-svn,代码行数:29,代码来源:index.php

示例5: drupal_bootstrap

<?php

// $Id: index.php,v 1.90 2006/01/27 18:51:51 dries Exp $
/**
 * @file
 * The PHP page that serves all page requests on a Drupal installation.
 *
 * The routines here dispatch control to the appropriate handler, which then
 * prints the appropriate page.
 */
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$return = menu_execute_active_handler();
switch ($return) {
    case MENU_NOT_FOUND:
        drupal_not_found();
        break;
    case MENU_ACCESS_DENIED:
        drupal_access_denied();
        break;
    case MENU_SITE_OFFLINE:
        drupal_site_offline();
        break;
    default:
        // Print any value (including an empty string) except NULL or undefined:
        if (isset($return)) {
            print theme('page', $return);
        }
        break;
}
drupal_page_footer();
开发者ID:BackupTheBerlios,项目名称:argonautsvn-svn,代码行数:31,代码来源:index.php

示例6: error_reporting

<?php

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
/**
 * @file
 * The PHP page that serves all page requests on a Drupal installation.
 *
 * The routines here dispatch control to the appropriate handler, which then
 * prints the appropriate page.
 *
 * All Drupal code is released under the GNU General Public License.
 * See COPYRIGHT.txt and LICENSE.txt.
 */
/**
 * Root directory of Drupal installation.
 */
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
menu_execute_active_handler();
开发者ID:rgraves1989,项目名称:hemphues,代码行数:22,代码来源:index.php

示例7: get_layer_data

function get_layer_data($layer_tablename, $row_id, $point, $tabexists) {
  /* Code to retrieve layer data to display on the page */
  if($point != NULL) {
    $query_on='POINT';
  }
  else {
    $query_on='ID';
  }

  $layer_id=0;
  list($layer_id, $layer_tablename, $layer_summary_columns)=get_layer_summary_columns($layer_tablename);

  switch($query_on) {
    case 'POINT':
      $query="SELECT " . AUTO_DBCOL_PREFIX . "id," . AUTO_DBCOL_PREFIX . "layer_id, %s," . AUTO_DBCOL_PREFIX . "nid FROM \"%s\" where ST_Contains(" . AUTO_DBCOL_PREFIX . "topology,GeomFromText('%s', (select srid from geometry_columns where f_table_name = '%s')))";
      $query_args=array(str_replace("'", '"', $layer_summary_columns), $layer_tablename, $point, $layer_tablename);
      break;

    case 'ID':
      $query="SELECT " . AUTO_DBCOL_PREFIX . "id," . AUTO_DBCOL_PREFIX . "layer_id, %s," . AUTO_DBCOL_PREFIX . "nid FROM \"%s\" where " . AUTO_DBCOL_PREFIX . "id = %d";
      $query_args=array(str_replace("'", '"', $layer_summary_columns), $layer_tablename, $row_id);
      break;
  }

  $result_category=db_query($query, $query_args);
  if(!$result_category) {
    //Error occured
    $errmsgstr=$GLOBALS['errmsgstr'];
    die('Error fetching feature info. ' . $errmsgstr);
  }
  else {
    $global_resource_mapping=getResourceTableMapping($layer_tablename);

    $col_info=getDBColDesc($layer_tablename, $layer_summary_columns);

    $ret_access=menu_execute_active_handler("node/add/node-mlocate-feature/popup");

    $details_lnk="";
    if($category_obj=db_fetch_object($result_category)) {
      $class=$category_obj;
      $ifr_src="";

      $html="";
      $html.='<div id="attribute_div" style="font:arial;display:block;"><table style="border-collapse:separate;">';
      foreach($class as $key=>$value) {
        switch($key) {
          case AUTO_DBCOL_PREFIX . 'id':
            break;

          case AUTO_DBCOL_PREFIX . 'layer_id':
            break;

          case AUTO_DBCOL_PREFIX . 'location':
            break;

          case AUTO_DBCOL_PREFIX . 'topology':
            break;

          case AUTO_DBCOL_PREFIX . 'created_by':
            $html.="<tr><td><b>Created By: </b></td><td>" . getUserLink($value) . "</td></tr>";
            break;

          case AUTO_DBCOL_PREFIX . 'modified_by':
            $html.="<tr><td><b>Modified By: </b></td><td>" . getUserLink($value) . "</td></tr>";
            break;

          case AUTO_DBCOL_PREFIX . 'status':
            $html.="<tr><td><b>Status: </b></td><td>" . (($value == 1) ? "Active" : "In-active") . "</td></tr>";
            break;

          case AUTO_DBCOL_PREFIX . 'nid':
            if($value == 0) {
              if(is_int($ret_access)) {
                switch($ret_access) {
                  case MENU_ACCESS_DENIED:
                    global $user;
                    if($user->uid < 1) {
                      $details_type="add";
                      $details_lnk="{$base_path}node/add/node-mlocate-feature/popup?layer_tablename={$layer_tablename}&point_id={$row_id}";
                    }
                    break;
                }
            }
            else {
              $details_type="add";
              $details_lnk="{$base_path}node/add/node-mlocate-feature/popup?layer_tablename={$layer_tablename}&point_id={$row_id}";
            }
          }
          else {
            $ifr_src="{$base_path}node/{$value}/popup";
            $details_type="more";
            $details_lnk=$ifr_src;
            $nid=$value;
          }
          break;

          default : if(array_key_exists($key, $global_resource_mapping)) {
            $href="{$base_path}ml_orchestrator.php?action=getResourceTableEntry&resource_tablename=" . $global_resource_mapping[$key]['resource_tablename'] . "&resource_column=" . $global_resource_mapping[$key]['resource_column'] . "&value={$value}";
            $html.="<tr><td><b title='" . $col_info[$key] . "'>" . ($col_info[$key] == "" ? $key : $col_info[$key]) . ": </b></td><td>" . ($value == '' ? '&nbsp;' : "<a id='a_{$value}' name='' href='{$href}'onClick='javascript:showAjaxLinkPopup(this.href, this.name);return false;'>" . str_replace(" ", "&nbsp;", $value) . "</a>") . "</td></tr>";
          }
//.........这里部分代码省略.........
开发者ID:rahool,项目名称:maplocator,代码行数:101,代码来源:LayerData.php


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