Drupal 8 Site using Vue
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
510 B

  1. <?php
  2. namespace Drupal\vue_js_example\Plugin\Block;
  3. use Drupal\Core\Block\BlockBase;
  4. /**
  5. * Provides a 'VueArticlesBlock' block.
  6. *
  7. * @Block(
  8. * id = "vue_articles_block",
  9. * admin_label = @Translation("Vue articles block"),
  10. * )
  11. */
  12. class VueArticlesBlock extends BlockBase {
  13. /**
  14. * {@inheritdoc}
  15. */
  16. public function build() {
  17. $build = [];
  18. $build['#theme'] = 'vue_articles_block';
  19. $build['vue_articles_block']['#markup'] = 'Implement VueArticlesBlock.';
  20. return $build;
  21. }
  22. }