public tmpInstance ( ) |
public function tmpInstance()
{
return $this->getClone()->savestate(false)->setIgnoreRequest(true)->clearState();
}
/** * Returns a temporary instance of the model. Please note that this returns a _clone_ of the model object, not the * original object. The new object is set up to not save its stats, ignore the request when getting state variables * and comes with an empty state. The temporary object instance has its data reset as well. * * @return $this */ public function tmpInstance() { return parent::tmpInstance()->reset(true, true); }