Softdelete

Can someone describe me, how the mustTakeAction work in the softDelete behaviour?

I would like to turn off the softDelete in a special case.



46.7k
edited Feb '15

Please take a look at my improved SoftDelete code. I doubt that its perfect yet but I think that it is a hell of a lot better than the ~~Incubator~~ Phalcon 2.0 Zephir code. I'm not currently pushing my SoftDelete code to the limits but I intend to try to get it into upstream within the next several months.



46.7k
edited Feb '15

Also, in my Webird project and in my own personal code I eventually just said F it and I implemented it with a Trait. I'm not using a Trait for the Behavior part because the Behaviors are better in every way than Traits for that. I'm using the Trait to add extra value to the model to be able to take advantage of the SoftDelete Behavior. There might be some fixes in this code over the forum link in the previous post. Also, if you don't want to use a Trait then just copy the Trait methods into your model base class [if you are using PHP 5.4+].



46.7k
edited Feb '15

Oops. I think that the final isSoftDelete flag needs to be set to false and possibly moved lowed as well. I think that I fixed this but it must have been lost in my code shuffle and I'm not really using it yet.



1.4k

Thanks you i will see ur code!