Created
September 30, 2012 21:46
-
-
Save EclipseGc/3808538 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\bartik\blocks; | |
use Drupal\layout\Plugin\block\block\PagePrimaryLinks; | |
class PrimaryLinks extends PagePrimaryLinks { | |
/** | |
* Implements BlockInterface::build(). | |
*/ | |
public function build() { | |
return array( | |
'#prefix' => '<div id="main-menu" class="navigation">', | |
'#suffix' => '</div>', | |
'#children' => theme('links__system_main_menu', array( | |
'links' => menu_main_menu(), | |
'attributes' => array( | |
'id' => 'main-menu-links', | |
'class' => array('links', 'clearfix'), | |
), | |
'heading' => array( | |
'text' => t('Main menu'), | |
'level' => 'h2', | |
'class' => array('element-invisible'), | |
), | |
)), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment