From ef4fc53e161b315a6e5a0e64928af53b463ebb7c Mon Sep 17 00:00:00 2001 From: Alexander O'Neill Date: Fri, 9 Nov 2018 15:47:51 -0400 Subject: [PATCH] Initial commit --- lmmi.info.yml | 7 ++++++ lmmi.module | 24 ++++++++++++++++++++ src/Plugin/Block/TocWrapperBlock.php | 33 ++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 lmmi.info.yml create mode 100644 lmmi.module create mode 100644 src/Plugin/Block/TocWrapperBlock.php diff --git a/lmmi.info.yml b/lmmi.info.yml new file mode 100644 index 0000000..15efc0e --- /dev/null +++ b/lmmi.info.yml @@ -0,0 +1,7 @@ +name: 'lmmi' +type: module +description: 'Custom extensions for the LMMI Journal site' +core: 8.x +package: 'LMMI' +dependencies: + - toc_api diff --git a/lmmi.module b/lmmi.module new file mode 100644 index 0000000..8082dab --- /dev/null +++ b/lmmi.module @@ -0,0 +1,24 @@ +' . t('About') . ''; + $output .= '

' . t('Custom extensions for the LMMI Journal site') . '

'; + return $output; + + default: + } +} diff --git a/src/Plugin/Block/TocWrapperBlock.php b/src/Plugin/Block/TocWrapperBlock.php new file mode 100644 index 0000000..bbefba8 --- /dev/null +++ b/src/Plugin/Block/TocWrapperBlock.php @@ -0,0 +1,33 @@ +getCurrentToc()) { + return parent::build(); + } + + return []; + } + /** + * @inheritdoc + */ + protected function getCurrentTocId() { + return 'toc_filter'; + } +}