You are here

PrimaryNavigation.php in Mobile sliding menu 8

File

src/Plugin/Block/PrimaryNavigation.php
View source
<?php

namespace Drupal\mmenu\Plugin\Block;

use Drupal\Core\Block\BlockBase;

/**
 * Provides a Primary Navigation block.
 *
 * @Block(
 *  id = "mmenu:primary_navigation",
 *  admin_label = @Translation("Primary Navigation"),
 * )
 */
class PrimaryNavigation extends BlockBase {

  /**
   * {@inheritdoc}
   */
  public function build() {
    $render_array = array(
      '#theme' => 'mmenu_primary_navigation',
    );
    $block = array(
      '#type' => 'markup',
      '#markup' => render($render_array),
    );
    return $block;
  }

}

Classes

Namesort descending Description
PrimaryNavigation Provides a Primary Navigation block.