delete() public method

Delete module
public delete ( ) : boolean
return boolean
Beispiel #1
0
 /**
  * Tears down the fixture, for example, closes a network connection.
  * This method is called after a test is executed.
  *
  * @return void
  */
 protected function tearDown()
 {
     $this->module->delete();
     unset($this->module);
     unset($this->renderer);
     unset($this->object);
 }
Beispiel #2
0
 /**
  * Tears down the fixture, for example, closes a network connection.
  * This method is called after a test is executed.
  *
  * @return void
  */
 protected function tearDown()
 {
     $this->boostrap->uninstall();
     $this->document->delete();
     $this->view->delete();
     $this->layout->delete();
     $this->documentType->delete();
     $this->user->delete();
     $this->module->delete();
     unset($this->module);
     unset($this->document);
     unset($this->view);
     unset($this->layout);
     unset($this->documentType);
     unset($this->user);
     unset($this->object);
     unset($this->renderer);
 }
Beispiel #3
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;
 }
Beispiel #4
0
 /**
  * Test
  *
  * @return void
  */
 public function testDeleteWithNoId()
 {
     $model = new Model();
     $this->assertFalse($model->delete());
 }