public function changeState($id, $newState = 0)
    {
        if (!$object = $this->find($id)) {
            return false;
        }
        $object->setIsActive($newState);
        $this->save($object);

        return true;
    }
public function changeState($id, $newState = 0)
    {
        if (!$object = $this->find($id)) {
            return false;
        }
        $object->setIsActive($newState);
        $this->save($object);

        return true;
    }
public function changeState ( $ id , $ newState = 0 ) { if ( ! $ object = $ this -> find ( $ id ) ) { return false ; } $ object -> setIsActive ( $ newState ) ; $ this -> save ( $ object ) ; return true ; }
Change the state of a room type

@param  integer $id
@param  boolean $newState
@return boolean
Change the state of a room type