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
450 B

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