Skip to content

Instantly share code, notes, and snippets.

View EclipseGc's full-sized avatar

Kris Vanderwater EclipseGc

View GitHub Profile
<?php
namespace Drupal\layout\Plugin\block\block;
use Drupal\block\BlockBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
* @Plugin(
/**
* Implements hook_block_alter().
*/
function bartik_block_alter(&$definitions) {
$definitions['page_primary_links']['class'] = 'Drupal\\bartik\\blocks\\PrimaryLinks';
$definitions['page_secondary_links']['class'] = 'Drupal\\bartik\\blocks\\SecondaryLinks';
}
<?php
namespace Drupal\bartik\blocks;
use Drupal\layout\Plugin\block\block\PagePrimaryLinks;
class PrimaryLinks extends PagePrimaryLinks {
/**
* Implements BlockInterface::build().