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


PHP _block_get_renderable_array函数代码示例

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


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

示例1: cpr_foundation_access_preprocess_user_profile

/**
 * Implements template_preprocess_user_profile.
 */
function cpr_foundation_access_preprocess_user_profile(&$vars)
{
    $vars['displayname'] = '';
    if (isset($vars['field_first_name'][0]['safe_value'])) {
        $vars['displayname'] .= $vars['field_first_name'][0]['safe_value'] . ' ';
    }
    if (isset($vars['field_last_name'][0]['safe_value'])) {
        $vars['displayname'] .= $vars['field_last_name'][0]['safe_value'];
    }
    if (isset($vars['field_display_name'][0]['safe_value'])) {
        $vars['displayname'] .= ' | ' . $vars['field_display_name'][0]['safe_value'];
    }
    if (empty($vars['displayname'])) {
        $vars['displayname'] = $vars['user_name'];
    }
    if (!empty($vars['field_user_photo'])) {
        $vars['field_user_photo'][0]['attributes'] = array('class' => array('circle', 'ferpa-protect'));
        $vars['field_user_photo'][0]['alt'] = t('Picture of @name', array('@name' => $vars['displayname']));
        $vars['field_user_photo'][0]['path'] = $vars['field_user_photo'][0]['uri'];
        $vars['photo'] = theme('image', $vars['field_user_photo'][0]);
    } else {
        $vars['photo'] = '<img src="' . base_path() . drupal_get_path('theme', 'foundation_access') . '/img/user.png" class="ferpa-protect circle" />';
    }
    if (!empty($vars['field_user_banner'])) {
        $vars['banner'] = $vars['user_profile']['field_user_banner'];
    } else {
        $vars['banner'] = '<img class="background" src="http://materializecss.com/images/office.jpg" alt="">';
    }
    // load up related user data
    $blockObject = block_load('elmsln_core', 'elmsln_core_user_xapi_data');
    $vars['user_data'] = _block_get_renderable_array(_block_render_blocks(array($blockObject)));
}
开发者ID:mmilutinovic1313,项目名称:elmsln,代码行数:35,代码来源:template.php

示例2: doRenderBlock

 /**
  * Render a Drupal block
  */
 public function doRenderBlock($module, $delta)
 {
     // $block = block_load($module, $delta);
     $blocks = module_invoke($module, 'block_info');
     if (!isset($blocks[$delta])) {
         return;
     }
     $block = (object) $blocks[$delta];
     $block->module = $module;
     $block->delta = $delta;
     $block->status = 1;
     $block->region = 'content';
     $block->weight = 0;
     $block->theme = $GLOBALS['theme_key'];
     // Those won't serve any purpose but avoid nasty PHP warnings
     $block->title = '';
     $block->pages = '';
     $block->visibility = 0;
     // BLOCK_VISIBILITY_NOTLISTED (block module could be disabled)
     $block->custom = null;
     $blockList = [$block];
     drupal_alter('block_list', $blockList);
     $render_array = _block_get_renderable_array(_block_render_blocks($blockList));
     return drupal_render($render_array);
 }
开发者ID:makinacorpus,项目名称:drupal-sf-dic,代码行数:28,代码来源:DrupalBlockExtension.php

示例3: block_render

function block_render($module, $block_id)
{
    $block = block_load($module, $block_id);
    $block_content = _block_render_blocks(array($block));
    $build = _block_get_renderable_array($block_content);
    $block_rendered = drupal_render($build);
    print $block_rendered;
}
开发者ID:Virprince,项目名称:drupal7,代码行数:8,代码来源:template-override-utile.php

示例4: bc_theme_preprocess_page

/**
 * Implements HOOK_preprocess_page().
 */
function bc_theme_preprocess_page(&$vars)
{
    // Render logo block for presentation region.
    $block = block_load('bc_blocks', 'bc_pres_logo');
    $vars['pres_logo'] = _block_get_renderable_array(_block_render_blocks(array($block)));
    // Is moderator.
    $vars['is_moderator'] = in_array('moderator', $vars['user']->roles);
}
开发者ID:renanmfd,项目名称:bc_bluehost,代码行数:11,代码来源:template.php

示例5: customPrintViewsBlock

function customPrintViewsBlock($blockName)
{
    $block = block_load("views", $blockName);
    $blocks_to_render = _block_render_blocks(array($block));
    if (count($blocks_to_render) > 0) {
        $render_array = _block_get_renderable_array($blocks_to_render);
        print render($render_array);
        return true;
    }
    return false;
}
开发者ID:jeddobson,项目名称:LacunaStories,代码行数:11,代码来源:user-profile.tpl.php

示例6: nuboot_radix_menu_tree__primary

/**
 * NuBoot theme wrapper function for the primary menu links.
 */
function nuboot_radix_menu_tree__primary(&$variables)
{
    return '<ul class="menu nav navbar-nav">' . $variables['tree'] . '</ul>';
    // Add views exposed search.
    $block = block_load('dkan_sitewide', 'dkan_sitewide_search_bar');
    if ($block) {
        $search = _block_get_renderable_array(_block_render_blocks(array($block)));
        print render($search);
    }
    // End views exposed search.
}
开发者ID:newswim,项目名称:dkan-drops-7,代码行数:14,代码来源:menu-tree.func.php

示例7: viewBlock

 /**
  * Render a specific block.
  *
  * @param string $module
  *   The module machine name.
  * @param string $delta
  *   The block delta.
  *
  * @return array
  *   The render array of the block output.
  */
 public static function viewBlock($module, $delta)
 {
     $block = new stdClass();
     $block->module = $module;
     $block->delta = $delta;
     $block->enabled = TRUE;
     $block->page_match = TRUE;
     $blocks = array();
     $blocks[$module . "_" . $delta] = $block;
     $block_content = _block_render_blocks($blocks);
     return _block_get_renderable_array($block_content);
 }
开发者ID:juampynr,项目名称:DrupalCampEs,代码行数:23,代码来源:RenderHelper.php

示例8: footmali_headline_articles

<?php

$headlines = footmali_headline_articles();
$block = block_load('views', 'news-most_read_articles');
$block_array = _block_render_blocks(array($block));
$block_render = _block_get_renderable_array($block_array);
?>

<div class="widget kopa-tab-1-widget">
    <div class="kopa-tab style7">
        <ul class="nav nav-tabs">
            <?php 
if (count($headlines) > 0) {
    ?>
                <li class="active"><a href="#headlines" data-toggle="tab"><span><?php 
    echo t('Headlines');
    ?>
</span></a></li>
            <?php 
}
?>
            <li><a href="#news" data-toggle="tab"><span><?php 
echo t('Most Popular');
?>
</span></a></li>
        </ul>
        <!-- nav-tabs -->
        <div class="tab-content">
            <div class="tab-pane active" id="headlines">
                <ul class="kopa-list clearfix">
                    <?php 
开发者ID:souleyHype,项目名称:footmali-drupal-theme,代码行数:31,代码来源:_news_headlines_popular.php

示例9: logic_block_get_block_content

/**
 * Gets a block's content.
 *
 * @param integer $data
 *   Bid for this block.
 */
function logic_block_get_block_content($data)
{
    $result = db_query('SELECT module,delta from {block} where bid = :bid', array(":bid" => $data));
    $block_data = $result->fetch();
    $block = block_load($block_data->module, $block_data->delta);
    $renderable_block = _block_get_renderable_array(_block_render_blocks(array($block)));
    return drupal_render($renderable_block);
}
开发者ID:annamarriap,项目名称:sig,代码行数:14,代码来源:form_library.php

示例10: webform_node_view

webform_node_view($node, 'full');
print theme_webform_view($node->content);
?>
        </div>
    </div>
</div>





/* TESTIMONIALS SECTION */
<div class="sections testimonials_section">
<?php 
$block = block_load('views', 'testimonial_slider-block');
$output = _block_get_renderable_array(_block_render_blocks(array($block)));
$output = drupal_render($output);
print $output;
?>
    <!--  <div class="boxes-2">-->
    <!--    <ul>-->
    <!--      <li>-->
    <!--        <div class="test-content">-->
    <!--          <i class="fa fa-quote-left"></i>Mydea is a high-value partner. I've-->
    <!--          worked with them while leading account development teams at two-->
    <!--          separate organizations over the past five years and have consistently-->
    <!--          received best-in-class service from their customer and prospect-->
    <!--          engagement services. We've been able to leverage the information that-->
    <!--          they've uncovered from customer engagement activities to win business-->
    <!--          and strengthen customer relationship. Mydea delivers.<i class="fa fa-quote-right"></i>-->
    <!--          <div class="test-title"> – Senior Manager, Market Development</div>-->
开发者ID:ph3l1x,项目名称:mydea,代码行数:31,代码来源:default_html.php

示例11: block_load

 * - $rows: The results of the view query, if any
 * - $empty: The empty text to display if the view is empty
 * - $pager: The pager next/prev links to display, if any
 * - $exposed: Exposed widget form/info to display
 * - $feed_icon: Feed icon to display, if any
 * - $more: A link to view more, if any
 *
 * @ingroup views_templates
 */
?>

<div class="panel-display panel-2col clearfix">
  <div class="panel-col-first">
    <?php 
$block = block_load('odp_dashboard_blocks', 'dataset_nav');
print drupal_render(_block_get_renderable_array(_block_render_blocks(array($block))));
?>

    <?php 
if (!empty($node->current_revision_id) && $node->current_revision_id != $node->vid) {
    ?>
      <?php 
    if (user_access('revert revisions')) {
        ?>
        <a class="btn btn-create-dataset" href="/node/<?php 
        echo $node->nid;
        ?>
/revisions/<?php 
        echo $node->vid;
        ?>
/revert">Revert</a>
开发者ID:ECOGIG,项目名称:ecogig-odp,代码行数:31,代码来源:views-view--workflow-history--page.tpl.php

示例12: views_embed_view

<!--DRUPAL NO CACHE-->
<?php 
if ($view_name != '') {
    print views_embed_view($view_name, $block_id);
} else {
    if ($module_name != '') {
        $block = block_load($module_name, $block_id);
        $block_render = _block_render_blocks(array($block));
        $block_render_array = _block_get_renderable_array($block_render);
        $output = drupal_render($block_render_array);
        print $output;
    }
}
开发者ID:drupalconnect,项目名称:finsearches,代码行数:13,代码来源:embeded.tpl.php

示例13: _humanitarianresponse_block_render

/**
 * Custom function to render a block so I can manually position it in the markup
 */
function _humanitarianresponse_block_render($module, $block_id) {
  $block = block_load($module, $block_id);
  $block_content = _block_render_blocks(array($block));
  $build = _block_get_renderable_array($block_content);
  $block_rendered = drupal_render($build);
  return $block_rendered;
}
开发者ID:pcambra,项目名称:site,代码行数:10,代码来源:template.php

示例14: rwom_node__article__full

/**
 * theme_node__article
 */
function rwom_node__article__full($variables)
{
    module_load_include('inc', 'custom_render', 'custom_render_menu');
    //Possibly render the comment box here as well
    $output = array();
    $node = menu_get_object();
    if (is_object($node) && $node->type === 'article') {
        $body = $variables['content']['body'];
        //drupal_set_message("<pre>" . print_r($variables, TRUE) . "</pre>");
        //Submitted
        $submitted_date = format_date($node->changed, 'custom', 'F, jS Y');
        $submitted = "<div class='submitted-time'><i class='fa fa-calendar'></i> {$submitted_date}</div>";
        $disqus_recent_comments_block = block_load('disqus', 'disqus_recent_comments');
        $disqus_recent_comments = _block_get_renderable_array(_block_render_blocks(array($disqus_recent_comments_block)));
        $disqus_comments_block = block_load('disqus', 'disqus_comments');
        $disqus_comments = _block_get_renderable_array(_block_render_blocks(array($disqus_comments_block)));
        $output = array('#markup' => "<div class='article-view-mode-full'>" . render($submitted) . render($body) . "</div>", '#suffix' => "<div class='l-featured-section'><div class='l-featured-inner'>" . _custom_render_blogs_featured() . "</div></div>", '#attached' => array('css' => array(drupal_get_path('theme', 'rwom') . '/css/pages/blogs.css')));
    }
    return render($output);
}
开发者ID:rwaery11,项目名称:ardoubleyou.com,代码行数:23,代码来源:template.php

示例15: block_load

    ?>
        </nav>
      </div>
    <?php 
}
?>
  </div>
   <div class="hero-text-box">
      <h1><span>UNLOCK YOUR PHONE!</span></h1>
      <a href="#" class="js-scroll-to-featured-services btn btn-full">UNLOCK NOW</a>
      <a href="#" class="btn btn-ghost js-scroll-to-how-it-works">HOW IT WORKS</a>

  </div>
              <?php 
$blockObject = block_load('imeidata', 'imeidata');
$block = _block_get_renderable_array(_block_render_blocks(array($blockObject)));
$output = drupal_render($block);
print $output;
?>
</header>

<div class="main-container container">

  <header role="banner" id="page-header">
    <?php 
if (!empty($site_slogan)) {
    ?>
      <p class="lead"><?php 
    print $site_slogan;
    ?>
</p>
开发者ID:xuandev,项目名称:punlocks,代码行数:31,代码来源:page--front.tpl.php


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