Guest User

Untitled

a guest
Aug 21st, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. // This is a part of the controller function from where I am calling below defined methods.
  2. $this->updateBlock();
  3.  
  4. protected function getBlock() {
  5. $block = $this->blockManager->createInstance('block_id', []);
  6. return $block;
  7. }
  8.  
  9. public function updateBlock() {
  10. $block = $this->getBlock();
  11. $this->response->addCommand(new ReplaceCommand('.block--class', $block->build()));
  12. return $this->response;
Add Comment
Please, Sign In to add comment