This extension enables limiting the 'edit' action of a CActiveRecord to a certain time frame after model creation time.
// For complete documentation on the parameters passed below please see class PcLimitEditTimePeriod public function behaviors() { return array( // ... 'limitEditTimePeriod' => array( 'class' => 'PcLimitEditTimePeriod', // Notice that some of the next config params are set according to values in AR class constants //'createdOnAttrName' => 'created_at', //'timeout' => self::EDIT_TIME_LIMIT, //'message' => self::EDIT_TIMEOUT_MESSAGE (using Yii::t() is even better...) //'useLogging' => true, ), // ... ); }
Total 3 comments
If I got you right (sorry - I had hard times understanding clearly what you meant... :-) , then you should use the API methods described in "Usage" section in the model controller class to check if the timeout has passed or not.
I have tried,is behavor method write i model,in which u want?I have tried like that, but it is not working correctly,no erroe found,after time ellapsed.
wish I thought of it, I'll check it out
Leave a comment
Please login to leave your comment.