/**
 * Evaluates and echoes a component slot.
 * The component name is deduced from the definition of the view.yml
 * For a variable to be accessible to the component and its partial, 
 * it has to be passed in the second argument.
 *
 * <b>Example:</b>
 * <code>
 *  include_component_slot('sidebar', array('myvar' => 12345));
 * </code>
 *
 * @param  string slot name
 * @param  array variables to be made accessible to the component
 * @return void
 * @see    get_component_slot, include_partial, include_component
 */
function include_component_slot($name, $vars = array())
{
    echo get_component_slot($name, $vars);
}
Exemple #2
0
<footer class="footer">

  <?php 
if (QubitAcl::check('userInterface', 'translate')) {
    ?>
    <?php 
    echo get_component('sfTranslatePlugin', 'translate');
    ?>
  <?php 
}
?>

  <?php 
echo get_component_slot('footer');
?>

    <div class="footer-container">
      <div class="container">
        <div class="col-md-2 text-center">
          <?php 
echo image_tag('/plugins/arKbStyle2Plugin/images/kb_logo_black.svg');
?>
        </div>
        <div class="col-md-10 text-black">
          <p>
            <strong><a href="http://www.kb.se" alt="Länk till Kungl. bibliotekets webbplats">
              KUNGL. BIBLIOTEKET
            </a></strong>
            <br>
            <span>Support: <a href="mailto:test.test@kb.se">test.test@kb.se</a></span>
          </p>
<div class="column sidebar" id="sidebar-first">
  <div class="section">

    <?php 
echo get_component_slot('sidebar');
?>

    <?php 
echo get_component('menu', 'browseMenu');
?>

  </div> <!-- /.section -->
</div> <!-- /.column.sidebar#sidebar-first -->
            <div id="search-bar">
                <?php 
echo get_component('search', 'box');
?>

                <?php 
echo get_component('menu', 'browseMenu', array('sf_cache_key' => $sf_user->getCulture() . $sf_user->getUserID()));
?>
            </div>
        </div>
    </div>
</header>

<nav id="menu-bar">
    <?php 
echo get_component('menu', 'quickLinksMenu');
?>

    <?php 
echo get_component('menu', 'changeLanguageMenu');
?>

    <?php 
echo get_component('menu', 'mainMenu', array('sf_cache_key' => $sf_user->getCulture() . $sf_user->getUserID()));
?>

    <?php 
echo get_component_slot('header');
?>
</nav>