Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a part of the controller function from where I am calling below defined methods.
- $this->updateBlock();
- protected function getBlock() {
- $block = $this->blockManager->createInstance('block_id', []);
- return $block;
- }
- public function updateBlock() {
- $block = $this->getBlock();
- $this->response->addCommand(new ReplaceCommand('.block--class', $block->build()));
- return $this->response;
Add Comment
Please, Sign In to add comment