Пример #1
0
 /**
  * Uninstall from module name
  *
  * @param AbstractModule $module Module
  * @param Model          $model  Module model
  *
  * @return boolean
  */
 public static function uninstall($module, $model)
 {
     if (empty($model) or !$module->uninstall()) {
         return false;
     }
     $select = new Sql\Select();
     $select->from('user_acl_permission')->columns(array('id'))->where->equalTo('permission', $model->getName());
     $userAclPermissionId = $model->fetchOne($select);
     $delete = new Sql\Delete();
     $delete->from('user_acl');
     $delete->where->equalTo('user_acl_permission_id', $userAclPermissionId);
     $model->execute($delete);
     $delete = new Sql\Delete();
     $delete->from('user_acl_permission');
     $delete->where->equalTo('id', $userAclPermissionId);
     $model->execute($delete);
     $model->delete();
     return true;
 }
Пример #2
0
 /**
  * Test
  *
  * @return void
  */
 public function testUpdate()
 {
     $this->assertTrue($this->object->update('version'));
 }