Commit 0a7b3e6d authored by alexpott's avatar alexpott

Issue #2822975 by tedbow: Clean up unused portions of offcanvas_test module

parent e6bc96b3
<?php
namespace Drupal\offcanvas_test\Plugin\Block;
use Drupal\Core\Block\BlockBase;
use Drupal\Core\Url;
/**
* Provides an 'Off-canvas test block' block.
*
* @Block(
* id = "offcanvas_links_block",
* admin_label = @Translation("Off-canvas test block")
* )
*/
class TestBlock extends BlockBase {
/**
* {@inheritdoc}
*/
public function build() {
return [
'offcanvas_link_1' => [
'#title' => $this->t('Click Me 1!'),
'#type' => 'link',
'#url' => Url::fromRoute('offcanvas_test.thing1'),
'#attributes' => [
'class' => ['use-ajax'],
'data-dialog-type' => 'offcanvas',
],
],
'offcanvas_link_2' => [
'#title' => $this->t('Click Me 2!'),
'#type' => 'link',
'#url' => Url::fromRoute('offcanvas_test.thing2'),
'#attributes' => [
'class' => ['use-ajax'],
'data-dialog-type' => 'offcanvas',
],
],
'#attached' => [
'library' => [
'outside_in/drupal.off_canvas',
],
],
];
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment