/** * @param Event $event * @param ModelManagerInterface $modelsManager * @param ModelInterface $model */ public function afterInitialize(Event $event, ModelManagerInterface $modelsManager, ModelInterface $model) { $modelsManager->keepSnapshots($model, $this->keepSnapshots); }
/** * Sets if the model must keep the original record snapshot in memory * *<code> * *class Robots extends \Phalcon\Mvc\Model *{ * * public function initialize() * { * $this->keepSnapshots(true); * } * *} *</code> * * @param boolean $keepSnapshots */ protected function keepSnapshots($keepSnapshots) { $this->_modelsManager->keepSnapshots($keepSnapshots); }