• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP views_get_view函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: storyscopezen_preprocess_page

/**
 * Override or insert variables into the page templates.
 *
 * @param $variables
 *   An array of variables to pass to the theme template.
 * @param $hook
 *   The name of the template being rendered ("page" in this case.)
 */
function storyscopezen_preprocess_page(&$variables, $hook)
{
    global $user;
    if ($user->uid > 0) {
        $logout_string = '<div class="float_right" id="logout">' . t('You are signed in as ') . l(check_plain($user->name), 'user/' . $user->uid) . ' - ';
        $logout_string .= l(t('Sign out'), 'user/logout') . '</div>';
        $variables['logout_string'] = $logout_string;
    } else {
        $logout_string = '<div class="button float_right" id="logout">' . l(t('Sign in'), 'user/') . '</div>';
        $variables['logout_string'] = $logout_string;
    }
    // Add inline 'create new' buttons with title on certain pages.
    if (!empty($variables['page']['#views_contextual_links_info']['views_ui']['view']->name)) {
        $view_name = $variables['page']['#views_contextual_links_info']['views_ui']['view']->name;
        // We only need this inline create new button on certain views, so list them here.
        $create_new_views = array('dossier_stories_panel_pane');
        // Create and add in the button
        if (in_array($view_name, $create_new_views)) {
            drupal_set_message($view_name);
            $view = views_get_view($view_name);
            $view_display = $variables['page']['#views_contextual_links_info']['views_ui']['view_display_id'];
            $view->set_display($view_display);
            $button_html = array();
            $button_html = storyscope_listings_get_view_header_footer($view);
            if (!empty($button_html)) {
                $variables['title_suffix']['storyscope'] = array('#children' => $button_html);
            }
        }
    }
}
开发者ID:bridharr,项目名称:storyscope-lite,代码行数:38,代码来源:template.php


示例2: init

 /**
  * @inheritDoc
  */
 public function init()
 {
     $features = array();
     if ($view = $this->getOption('view', FALSE)) {
         list($views_id, $display_id) = explode(':', $view, 2);
         $view = views_get_view($views_id);
         if ($view && $view->access($display_id)) {
             $view->set_display($display_id);
             if (empty($view->current_display) || !empty($display_id) && $view->current_display != $display_id) {
                 if (!$view->set_display($display_id)) {
                     return FALSE;
                 }
             }
             $view->pre_execute();
             $view->init_style();
             $view->execute();
             // Do not render the map, just return the features.
             $view->style_plugin->options['skipMapRender'] = TRUE;
             $features = array_merge($features, $view->style_plugin->render());
             $view->post_execute();
         }
     }
     $this->setOption('features', $features);
     return parent::init();
 }
开发者ID:akapivo,项目名称:www.dmi.be,代码行数:28,代码来源:Views.php


示例3: loadView

 /**
  * Load a view from its name.
  *
  * @param string $view_name
  * 
  * @return view
  * 
  * @throws Yamm_Sync_ProfileException
  */
 public static function loadView($view_name)
 {
     if ($view = views_get_view($view_name)) {
         return $view;
     }
     throw new Yamm_Sync_ProfileException("View " . $view_name . " does not exists");
 }
开发者ID:pounard,项目名称:yamm,代码行数:16,代码来源:Views.php


示例4: __construct

 /**
  * Constructor
  *
  * Creates a new View instance.
  *
  * @param string $view_name The name of the view.
  */
 public function __construct($view_name)
 {
     if ($view = views_get_view($view_name)) {
         $this->base = $view;
     } else {
         throw new \Exception('The base view: ' . $view_name . ' does not exist!');
     }
 }
开发者ID:ryne-andal,项目名称:ablecore,代码行数:15,代码来源:View.php


示例5: getView

 /**
  * 
  */
 public function getView($name, $display)
 {
     $view = \views_get_view($name);
     $view->set_display($display);
     $view->pre_execute();
     $view->execute();
     return $view->render();
 }
开发者ID:saarmstrong,项目名称:erdiko-drupal,代码行数:11,代码来源:View.php


示例6: quick_search_example_qs_callback

/**
 * first one has to create a callback function that takes a search string as a param
 * PARAM $search: A string on which we are searching
 * RETURN an array of items to display (most likely links)
 */
function quick_search_example_qs_callback($search)
{
    $view = views_get_view('quick_search_example_view');
    $view->set_arguments(array($search));
    $view->pre_execute();
    $view->execute();
    foreach ($view->result as $result) {
        $item = $result->_entity_properties;
        $rtn[] = l($item['title'], $item['url']);
    }
    return $rtn;
}
开发者ID:anselmbradford,项目名称:OpenSanMateo,代码行数:17,代码来源:quick_search.api.php


示例7: getCartView

 private function getCartView()
 {
     // Load the specified View.
     $view = views_get_view('commerce_cart_form');
     $view->set_display('default');
     // Set the specific arguments passed in.
     $view->set_arguments(array($this->order_id));
     // Override the view url, if an override was provided.
     $view->override_url = 'cart';
     // Prepare and execute the View query.
     $view->pre_execute();
     $view->execute();
     return $view;
 }
开发者ID:redcrackle,项目名称:redtest-core,代码行数:14,代码来源:CommerceCartForm.php


示例8: __construct

 public function __construct($view_name, $display_id = NULL)
 {
     $this->view = views_get_view($view_name);
     if (!$this->view) {
         $this->setErrors('View does not exist.');
         $this->setInitialized(FALSE);
         return;
     }
     if (is_string($display_id)) {
         $this->view->set_display($display_id);
     } else {
         $this->view->init_display();
     }
     $this->setInitialized(TRUE);
 }
开发者ID:vishalred,项目名称:redtest-core-pw,代码行数:15,代码来源:View.php


示例9: hook_coffee_commands

/**
 * Extend the Coffee functionallity with your own commands and items.
 *
 * Here's an example of how to add content to Coffee.
 */
function hook_coffee_commands($op)
{
    $commands = array();
    // Basic example, for 1 result.
    $commands[] = array('value' => 'Simple', 'label' => 'node/example', 'command' => ':simple');
    // More advanced example to include a view.
    $view = views_get_view('my_entities_view');
    if ($view) {
        $view->set_display('default');
        $view->pre_execute();
        $view->execute();
        if (count($view->result) > 0) {
            foreach ($view->result as $row) {
                $commands[] = array('value' => ltrim(url('node/' . $row->nid), '/'), 'label' => check_plain('Pub: ' . $row->node_title), 'command' => ':x');
            }
        }
    }
    return $commands;
}
开发者ID:Probo-Demos,项目名称:drupal_github,代码行数:24,代码来源:coffee.api.php


示例10: __construct

 public function __construct($view_name, $display_id = NULL)
 {
     if (!module_exists('views')) {
         $this->setErrors('Please enable the Views module.');
         $this->setInitialized(FALSE);
         return;
     }
     $this->view = views_get_view($view_name);
     if (!$this->view) {
         $this->setErrors("View {$view_name} does not exist.");
         $this->setInitialized(FALSE);
         return;
     }
     if (is_string($display_id)) {
         $this->view->set_display($display_id);
     } else {
         $this->view->init_display();
     }
     $this->setInitialized(TRUE);
 }
开发者ID:redcrackle,项目名称:redtest-core,代码行数:20,代码来源:View.php


示例11: initializeView

 protected function initializeView($match = NULL, $match_operator = 'CONTAINS', $limit = 0, $ids = NULL)
 {
     $view_name = $this->field['settings']['handler_settings']['view']['view_name'];
     $display_name = $this->field['settings']['handler_settings']['view']['display_name'];
     $args = $this->field['settings']['handler_settings']['view']['args'];
     $entity_type = $this->field['settings']['target_type'];
     // Check that the view is valid and the display still exists.
     $this->view = views_get_view($view_name);
     if (!$this->view || !isset($this->view->display[$display_name]) || !$this->view->access($display_name)) {
         watchdog('entityreference', 'The view %view_name is no longer eligible for the %field_name field.', array('%view_name' => $view_name, '%field_name' => $this->instance['label']), WATCHDOG_WARNING);
         return FALSE;
     }
     $this->view->set_display($display_name);
     // Make sure the query is not cached.
     $this->view->is_cacheable = FALSE;
     // Pass options to the display handler to make them available later.
     $entityreference_options = array('match' => $match, 'match_operator' => $match_operator, 'limit' => $limit, 'ids' => $ids);
     $this->view->display_handler->set_option('entityreference_options', $entityreference_options);
     return TRUE;
 }
开发者ID:TabulaData,项目名称:donl_d7,代码行数:20,代码来源:EntityReference_SelectionHandler_Views.class.php


示例12: uconn_theme_preprocess_islandora_basic_collection_wrapper

/**
 * Implements hook_preprocess().
 */
function uconn_theme_preprocess_islandora_basic_collection_wrapper(&$variables)
{
    $dsid = theme_get_setting('collection_image_ds');
    if (isset($variables['islandora_object'][$dsid])) {
        $variables['collection_image_ds'] = theme_get_setting('collection_image_ds');
    }
    module_load_include('module', 'islandora_solr_metadata', 'islandora_solr_metadata');
    $variables['meta_description'] = islandora_solr_metadata_description_callback($variables['islandora_object']);
    $view = views_get_view('clone_of_islandora_usage_stats_for_collections');
    if (isset($view)) {
        // If our view exists, then set the display.
        $view->set_display('block');
        $view->pre_execute();
        $view->execute();
        // Rendering will return the HTML of the the view
        $output = $view->render();
        // Passing this as array, perhaps add more, like custom title or the like?
        $variables['islandora_latest_objects'] = $output;
    }
}
开发者ID:CTDA,项目名称:uconn_theme,代码行数:23,代码来源:template.php


示例13: _objectLoad

 /**
  * (non-PHPdoc)
  * @see Yamm_Entity::_objectLoad()
  */
 protected function _objectLoad($identifier)
 {
     views_include('view');
     return views_get_view($identifier, TRUE)->export();
 }
开发者ID:pounard,项目名称:yamm,代码行数:9,代码来源:View.php


示例14: views_ui_clone_form

/**
 * Form callback to edit an exportable item using the wizard
 *
 * This simply loads the object defined in the plugin and hands it off.
 */
function views_ui_clone_form($form, &$form_state)
{
    $counter = 1;
    if (!isset($form_state['item'])) {
        $view = views_get_view($form_state['original name']);
    } else {
        $view = $form_state['item'];
    }
    do {
        if (empty($form_state['item']->is_template)) {
            $name = format_plural($counter, 'Clone of', 'Clone @count of') . ' ' . $view->get_human_name();
        } else {
            $name = $view->get_human_name();
            if ($counter > 1) {
                $name .= ' ' . $counter;
            }
        }
        $counter++;
        $machine_name = preg_replace('/[^a-z0-9_]+/', '_', drupal_strtolower($name));
    } while (ctools_export_crud_load($form_state['plugin']['schema'], $machine_name));
    $form['human_name'] = array('#type' => 'textfield', '#title' => t('View name'), '#default_value' => $name, '#size' => 32, '#maxlength' => 255);
    $form['name'] = array('#title' => t('View name'), '#type' => 'machine_name', '#required' => TRUE, '#maxlength' => 32, '#size' => 32, '#machine_name' => array('exists' => 'ctools_export_ui_edit_name_exists', 'source' => array('human_name')));
    $form['submit'] = array('#type' => 'submit', '#value' => t('Continue'));
    return $form;
}
开发者ID:e-gob,项目名称:GuiaDigital,代码行数:30,代码来源:views_ui.class.php


示例15: futurium_isa_theme_quant_page

function futurium_isa_theme_quant_page($vars) {

  $content = '';

  $content .= $vars['form'];

  //$content .= '<h1>Content stats</h1>';

  if ($vars['charts']) {
    foreach ($vars['charts'] as $chart) {
      $content .= $chart;
    }
  }

  $views['users'] = array(
    'title' => t('Users'),
    'view' => 'statistics_users',
    'class' => 'stats-user',
    'displays' => array(
      'most_active_users',
    ),
  );

  $views['futures'] = array(
    'title' => t('Futures'),
    'view' => 'statistics',
    'class' => 'stats-futures ',
    'displays' => array(
      'most_commented_futures',
      'most_voted_futures',
    ),
  );

  $views['ideas'] = array(
    'title' => t('Ideas'),
    'view' => 'statistics',
    'class' => 'stats-ideas',
    'displays' => array(
      'most_commented_ideas',
      'most_voted_ideas',
    ),
  );

  foreach($views as $group => $data) {
    $view_name = $data['view'];
    $content .= '<div class="' . $data['class'] . '"><h1 class="element-invisible">' . $data['title'] . '</h1>';
    foreach ($data['displays'] as $k => $display) {
      $view = views_get_view($view_name);
      $view->set_display($display);
      if (!empty($_GET['period'])) {
        $filters = $view->display_handler->get_option('filters');
        if (isset($filters['timestamp']['value'])) {
          $p = '-' . str_replace('_', ' ', $_GET['period']);
          $filters['timestamp']['value']['value'] = $p;
          $view->display_handler->set_option('filters', $filters);
          $view->pre_execute();
        }
      }
      $content .= '<div class="stats-block"><h2>' . $view->get_title() . '</h2>';
      $content .= $view->preview($display);
      $content .= '</div>';
    }
    $content .= '</div>';
  }

  return '<div id="quant-page">' . $content . '</div>';
}
开发者ID:ec-europa,项目名称:futurium-features,代码行数:67,代码来源:template.php


示例16: phptemplate_faceted_search_ui_stage_select

function phptemplate_faceted_search_ui_stage_select($search, $keyword_block_content, $guided_block_content, $description_content = '')
{
    /*
      if ($description_content != '') {
        $form['description'] = array(
          '#type' => 'item',
          '#value' => check_markup($description_content, FILTER_FORMAT_DEFAULT, FALSE),
          '#weight' => -5,
          '#attributes' => array('class' => 'faceted-search-description'),
        );
      }
    */
    if (($search->_env_id == 4 || $search->_env_id == 5) && $search->ui_state['stage'] == 'select') {
        if ($search->_env_id == 5) {
            // village
            //    $view = views_get_view('recent_active_tasks_'. $gtype);
            //      $view = views_get_view('village_news_latest_all');
            //      print ' <pre>'. var_export($view,true) .'</pre>';
            //      $middle_one = views_build_view('block', $view, NULL, 0, 5);
            $description = check_markup($description_content, FILTER_FORMAT_DEFAULT, FALSE);
            $middle_one = nabuur_og_list_active_villages();
            //      $view = views_get_view('og_new_villages');
            //      $middle_two = views_build_view('block', $view, NULL, 0, 5);
            $middle_two = nabuur_og_new_active_villages();
            $assist_img_link = l('<img height = "120px" align = "center" src="/files/static/connect-village.jpg"/>', '/assistance-your-community', null, null, null, null, true);
            $assist_link = l(t('Click here to register on NABUUR'), '/assistance-your-community');
            $form['middle']['#value'] = '<div class="search-description">' . $description . '</div>
      <div class="village-assist"><div class="nabuur-box nabuur-beige"><div class="nabuur-content"><div class="content"><div class="picture">' . $assist_img_link . '</div><div style="text-align: center">' . $assist_link . '</div></div></div></div></div>
      <div class="search-middle-first nabuur-box nabuur-border"><h3 class="title">News from the villages</h3><div class="content">' . $middle_one . '</div>
      </div><div class=spacer>&nbsp;</div>
      <div class="search-middle-second nabuur-box nabuur-border"><h3>New Villages on NABUUR.com</h3>' . $middle_two . '</div>
      <div class=spacer>&nbsp;</div>
      <div class="search-middle"><div class="search-top"><div class="search-middle-map" ><img src="/files/furniture/worldmap-s.png" width="350" height="181" border="0" usemap="#map" /><map name="map"><area title="Africa" shape="poly" coords="138,70,165,51,199,60,208,85,219,85,217,103,211,110,223,116,217,139,203,136,190,151,179,151,169,125,171,111,164,100,147,100,138,82,139,76" href="/village/results/taxonomy%3A8" />
      <area title="South America" shape="poly" coords="71,102,84,82,110,94,110,101,126,106,123,120,119,123,107,151,100,163,97,173,86,169,82,127,70,112" href="/village/results/taxonomy%3A10" />
      <area title="North America" shape="poly" coords="66,98,76,93,91,78,118,36,56,7,15,24,14,36,32,31,35,38,30,53,33,68,34,68" href="/village/results/taxonomy%3A11" />
      <area title="Asia" shape="poly" coords="223,86,231,75,251,99,257,91,255,80,262,80,265,92,294,89,286,79,297,61,288,53,263,38,211,40,196,36,198,59,209,74" href="/village/results/taxonomy%3A9" />
      </map></div>
      <div class="search-middle-where nabuur-box nabuur-border"><h3>Where do you want to go?</h3><h4><a href="/village/results/taxonomy:8">Africa</a></h4>
      <p>
      <a href="/village/results/taxonomy:8.12">Burundi</a> | <a href="/village/results/taxonomy:8.195">Botswana</a> | <a href="/village/results/taxonomy:8.13">Cameroon</a> | <a href="/village/results/taxonomy:8.214">DR of the Congo</a> | <a href="/village/results/taxonomy:8.15">Gambia</a> | <a href="/village/results/taxonomy:8.16">Ghana</a> | <a href="/village/results/taxonomy:8.17">Kenya</a> | <a href="/village/results/taxonomy:8.283">Liberia</a> | <a href="/village/results/taxonomy:8.290">Madagascar</a> | <a href="/village/results/taxonomy:8.18">Mali</a> | <a href="/village/results/taxonomy:8.19">Morocco</a> | <a href="/village/results/taxonomy:8.20">Nigeria</a> | <a href="/village/results/taxonomy:8.21">Rwanda</a> | <a href="/village/results/taxonomy:8.22">Senegal</a> | <a href="/village/results/taxonomy:8.23">Sierra Leone</a> | <a href="/village/results/taxonomy:8.24">South Africa</a> | <a href="/village/results/taxonomy:8.25">Tanzania</a> | <a href="/village/results/taxonomy:8.26">Uganda</a> | <a href="/village/results/taxonomy:8.27">Zambia</a> </p>
      <h4><a href="/village/results/taxonomy:9">Asia</a></h4>
      <p>
      <a href="/village/results/taxonomy:9.30">Bangladesh</a> | <a href="/village/results/taxonomy:9.31">Cambodia</a> | <a href="/village/results/taxonomy:9.208">China</a> | <a href="/village/results/taxonomy:9.32">India</a> | <a href="/village/results/taxonomy:9.33">Nepal</a> | <a href="/village/results/taxonomy:9.320">Pakistan</a> | <a href="/village/results/taxonomy:9.326">Philippines</a> | <a href="/village/results/taxonomy:9.34">Sri Lanka</a> | <a href="/village/results/taxonomy:9.1215">Tibet</a> 
      </p>
      <h4><a href="/village/results/taxonomy:10">Latin America</a></h4>
      <p>
      <a href="/village/results/taxonomy:10.226">Ecuador</a> | <a href="/village/results/taxonomy:10.29">Peru</a> | <a href="/village/results/taxonomy:11.35">Mexico</a>
      </p></div></div></div>
      <div class=spacer>&nbsp;</div>
      </div>';
        } else {
            // id = 4 group
            $view = views_get_view('recent_needshelp_tasks_village');
            $middle_two = views_build_view('block', $view, NULL, 0, 5);
        }
    }
    if ($description_content != '') {
        $form['description'] = array('#type' => 'item', '#weight' => -5, '#attributes' => array('class' => 'faceted-search-description'));
    }
    if ($keyword_block_content) {
        $form['keyword'] = array('#type' => 'fieldset', '#title' => t('Keyword search'), '#value' => $keyword_block_content, '#weight' => 0, '#attributes' => array('class' => 'faceted-search-keyword'));
    }
    if ($guided_block_content) {
        $form['guided'] = array('#type' => 'fieldset', '#title' => t('Guided search'), '#value' => $guided_block_content, '#weight' => 1, '#attributes' => array('class' => 'faceted-search-guided'));
    }
    return drupal_render($form);
}
开发者ID:nabuur,项目名称:nabuur-d5,代码行数:67,代码来源:template.php


示例17: array

        $output = $output . "</a>";
        $output = $output . "</li>";
    }
    $output = $output . "</ul>";
}
$output = $output . "<!-- HVAD SIGER LOVEN? SLUT -->";
// KONTAKT
// Hvis noden ikke er en 'ledig stilling'
if (taxonomy_term_load($node->field_indholdstype['und'][0]['tid'])->name != "Ledig stilling") {
    $output .= "<!-- KONTAKT START -->";
    if ($node->field_url or $node->field_url_2 or $node->field_diverse_boks) {
        $output .= "<hr>";
    }
    $output .= "<h2>Kontakt</h2>";
    $args = array($node->field_os2web_base_field_kle_ref['und'][0][tid], $node->field_os2web_base_field_kle_ref['und'][0][tid]);
    $view = views_get_view('kontakt_kle');
    $view->set_display('default');
    $view->set_arguments($args);
    $view->execute();
    if (count($view->result) > 0) {
        $output .= $view->render();
    } else {
        $output .= views_embed_view('kontakt_kle', 'default', 1968);
    }
    $output .= "<!-- KONTAKT SLUT -->";
}
// DEL PÅ SOCIALE MEDIER
// Hvis noden er en indholdsside, borger.dk-artikel eller en aktivitet
if ($node->type == 'os2web_base_contentpage' or $node->type == 'os2web_borger_dk_article') {
    include_once drupal_get_path('theme', 'ishoj') . '/includes/del-paa-sociale-medier.php';
}
开发者ID:ishoj,项目名称:ishoj.dk,代码行数:31,代码来源:node.tpl.php


示例18: node_load

        }
        ?>
                              <?php 
        $productnode = node_load($product->nid);
        $image_path = $productnode->field_image_cache[0]['filepath'];
        ?>
								<div style="float:left";>
								<?php 
        print theme('imagecache', 'product', $image_path, $productnode->title, '');
        ?>
								</div>
								<?php 
        // print "<pre>".print_r($product)."</pre>";
        if ($product->shippable == 0) {
            print $productnode->body;
            $view = views_get_view('uc_products');
            $view->set_display('block_3');
            $view->set_arguments(array($product->nid));
            // change the amount of items to show
            $view->set_items_per_page(4);
            $view->pre_execute();
            $view->execute();
            print $view->render();
        }
        ?>
							  <br />
								
								
							  <?php 
        //							  drupal_set_message("<pre>".print_r($productnode)."</pre>");
        ?>
开发者ID:hkillam,项目名称:NerudaArts,代码行数:31,代码来源:uc-order--customer.tpl.php


示例19: views_embed_view

  
  <?php $report= $field->content; ?>
  <?php endif; ?>
<?php endforeach; ?>


<?php
 /* $viewName1 = 'arabic_text';
print views_embed_view($viewName1 , $display_id = 'default', arg(4), arg(5), 'ARB');*/
if($_SESSION['qry']==1)
   {

$_SESSION['qry']=0;
$viewName = 'Hadith_Content_view';

  $view_12 = views_get_view($viewName);
   $view_12->set_display('default');
   $view_12->set_arguments(array(arg(2), arg(3)));
   $view_12->execute();
   $result_12 = $view_12->result;
  $output1 = $result_12[0]->node_revisions_body;
	   $output2 = $result_12[0]->nid;
    $_SESSION['nid']= $output2; 
 } 
 
 $nodid=$_SESSION['nid'];
  
   // $nodid=$output2;
//print $nodid.$cid."lllllllllll";
// $com_nodid=find_comment_id($cid);
开发者ID:ATouhou,项目名称:www.alim.org,代码行数:29,代码来源:views-view-fields--user-author-comments-hadith.tpl.php


示例20: array

 $displayMachineName = $_GET['display'];
 // Gather parameters - Any parameters to be queried with the view
 $viewParameterList = array();
 $paramId = 1;
 while (isset($_GET["param{$paramId}"])) {
     $viewParameterList[] = $_GET["param{$paramId}"];
     $paramId++;
 }
 // Gather parameters - Pager value
 $page = 0;
 // assume request for the first page of results from this view
 if (empty($_GET['page'])) {
     $page = intval($_GET['page']);
 }
 // Get this rendered-View's ($viewMachineName's) HTML under the display ($displayMachineName) with the parameters ($viewParameterList)
 $myview = views_get_view($viewMachineName);
 $myview->set_display($displayMachineName);
 $myview->set_arguments($viewParameterList);
 $myview->set_current_page($page);
 $myview->pre_execute();
 $viewHTML = $myview->preview();
 // Effectively, this returns views_embed_view($viewMachineName, $displayMachineName, $viewParameterList[0], $viewParameterList[1], $viewParameterList[2], $viewParameterList[3], [...]) for the given $page
 // Check if we are in Web-UI-Debug mode
 if (!empty($_GET['webuidebug']) && intval($_GET['webuidebug']) === 1) {
     // We are in Web-UI-Debug mode, use Kurumo to print $viewResults instead of just returning JSON
     dsm($viewResults);
     // Triggers Kurumo functionality (this function is part of the devel module)
     print '<b>In Web-UI-Debug mode</b>. See above for data and structure, see below for JSON output.';
     print '<textarea style="width: 100%; min-height: 500px;">' . json_encode($viewResults) . '</textarea>';
     print '<br/><br/><hr/>';
 } else {
开发者ID:hosttor,项目名称:BusinessUSA-OpenSource,代码行数:31,代码来源:views_embed_view.page.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP views_ui_standard_display_dropdown函数代码示例发布时间:2022-05-23
下一篇:
PHP views_get_current_view函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap