Block Controller cannot redeclare delete function
Permalink
Hi there,
i want to execute some code when a block is deleted.
But if i try to set up the delete() function in my controller i get following error message:
Cannot redeclare Application\Block\ThReferenzseite\Controller::delete()
http://concrete5.org/api/class-Concrete.Core.Block.BlockController....
Somebody has an idea how i can things get to run?
Thanks in advanced
Simon
i want to execute some code when a block is deleted.
But if i try to set up the delete() function in my controller i get following error message:
Cannot redeclare Application\Block\ThReferenzseite\Controller::delete()
public function delete(){ /*..*/ }
http://concrete5.org/api/class-Concrete.Core.Block.BlockController....
Somebody has an idea how i can things get to run?
Thanks in advanced
Simon
I think your delete function needs to call the parent delete function first
Thanks! But i just noticed that i defined the delete function twice in the controller.
Anyway what i tried to transpose still wont work.
Maybe you have a tip. I want execute a JS function in the view.php after a block is deleted.
I tried to set a var like so:
And then in the view.php
But this wont work.
cheers Simon
Anyway what i tried to transpose still wont work.
Maybe you have a tip. I want execute a JS function in the view.php after a block is deleted.
I tried to set a var like so:
$this->set('doTheJS', "yes");
And then in the view.php
if(isset($doTheJS)){ ?> <script type="text/javascript"> console.log("hello"); </script> <?}
But this wont work.
cheers Simon
I think that once a block is deleted, there is nothing you can do in the view. All you can do is in the delete function.
I might be wrong though...
I might be wrong though...