Skip to content

Instantly share code, notes, and snippets.

@EclipseGc
Created September 28, 2012 20:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EclipseGc/3801973 to your computer and use it in GitHub Desktop.
Save EclipseGc/3801973 to your computer and use it in GitHub Desktop.
<?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