Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. class HalPublicationBlock extends BlockBase implements BlockPluginInterface
  2. {
  3.  
  4. /**
  5. * {@inheritdoc}
  6. */
  7. public function build()
  8. {
  9. //do contain id but not bid
  10. $config = $this->getConfiguration();
  11. //$bid=$this->get->?
  12.  
  13. /**
  14. * {@inheritdoc}
  15. */
  16. public function blockSubmit($form, FormStateInterface $form_state) {
  17. $block_id = $form['id']['#default_value'];
  18. $this->configuration['block_class'] = $block_id;
  19. }
  20.  
  21. $formObject = $form_state->getFormObject()
  22.  
  23. /** @var DrupalblockBlockInterface $block */
  24. $block = $formObject->getEntity();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement