⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

How to destroy a grocery_crud object ?



oVERDRIVE
  • profile picture
  • Member

Posted 15 February 2013 - 12:03 PM

Hi

   how can I destroy, or unset a grocery_crud object ?

 

Actually I use a variable named $reset, and if put to 1, I show $grocery_crud->output,

else, doesn't.

I change the $reset value to callback function, but the solution doesn't clear for me ...

so I'd like to control the $grocery_crud variable directly,

like:

 

 

<?php if(!isset($grocery_crud)) : ?>

   html code

<?php  else: echo $grocery_crud->output; ?>

<?php  endif; ?>
 

 

and for this I must destroy the object $grocery_crud, like:

 

 

$crud->__destroy()
 

 

I try to find some distructon in the library grocery_crud.php, but unfortunately :(

 

in the controller ... is it possible ?


goFrendiAsgard
  • profile picture
  • Member

Posted 15 February 2013 - 22:11 PM

How about unset($crud)


oVERDRIVE
  • profile picture
  • Member

Posted 16 February 2013 - 10:18 AM

It doesn't work...

I call the unset function after callback function (after update), maybe when I reload the controller, the basic $crud object renew ...

I try to unset $crud obj in the controller ->index() too, bub I get the same result.