/** * Activate an entity instance * * @param BaseEntityAbstract $entity The entity that we are trying to activate * * @return int The number rows affected */ public function activate(BaseEntityAbstract $entity) { $entity->setActive(true); $entity = Dao::save($entity); $this->_affectedRows = 1; $this->_lastId = -1; $this->resetQuery(); return $this->_affectedRows; }