Created
September 28, 2012 20:40
-
-
Save EclipseGc/3801973 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\layout\Plugin\block\block; | |
use Drupal\block\BlockBase; | |
use Drupal\Core\Annotation\Plugin; | |
use Drupal\Core\Annotation\Translation; | |
/** | |
* @Plugin( | |
* id = "page_primary_links", | |
* subject = @Translation("Primary Navigation Links"), | |
* module = "layout", | |
* settings = { | |
* "status" = TRUE, | |
* "cache" = DRUPAL_NO_CACHE | |
* } | |
* ) | |
*/ | |
class PagePrimaryLinks extends BlockBase { | |
/** | |
* Implements BlockInterface::build(). | |
*/ | |
public function build() { | |
return array( | |
'#children' => theme('links', array('links' => menu_main_menu(), 'attributes' => array('class' => 'links primary-links'))), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment