protected function setPurgingAndSave($purge)
    {
        // Set purging state
        $purging = $this->getPurging();
        $this->setPurging($purge);

        // Save the model
        $result = $this->save();

        // Reset purging back to it's previous state
        $this->setPurging($purging);

        return $result;
    }
protected function setPurgingAndSave($purge)
    {
        // Set purging state
        $purging = $this->getPurging();
        $this->setPurging($purge);

        // Save the model
        $result = $this->save();

        // Reset purging back to it's previous state
        $this->setPurging($purging);

        return $result;
    }
protected function setPurgingAndSave ( $ purge ) { // Set purging state $ purging = $ this -> getPurging ( ) ; $ this -> setPurging ( $ purge ) ; // Save the model $ result = $ this -> save ( ) ; // Reset purging back to it's previous state $ this -> setPurging ( $ purging ) ; return $ result ; }
Set purging state and then save and then reset it.

@param bool $purge

@return bool
Set purging state and then save and then reset it .