/**
  * On global module disable, delete all created content
  */
 public function disable()
 {
     if (parent::disable()) {
         foreach (Content::model()->findAllByAttributes(array('object_model' => 'Document')) as $content) {
             $content->delete();
         }
         return true;
     }
     return false;
 }
Example #2
0
 public function disable()
 {
     if (parent::disable()) {
         foreach (CustomPage::model()->findAll() as $entry) {
             $entry->delete();
         }
         return true;
     }
     return false;
 }
Example #3
0
 public function disable()
 {
     if (parent::disable()) {
         foreach (WikiPage::model()->findAll() as $page) {
             $page->delete();
         }
         return true;
     }
     return false;
 }
 /**
  * On global module disable, delete all created content
  */
 public function disable()
 {
     if (parent::disable()) {
         foreach (Content::model()->findAll(array('condition' => 'object_model=:cat OR object_model=:libraryitem', 'params' => array(':cat' => 'LibraryCategory', ':libraryitem' => 'LibraryItem'))) as $content) {
             $content->delete();
         }
         return true;
     }
     throw new CHttpException(404);
     return false;
 }
 /**
  * Delete All Albums and settings.
  */
 public function disable()
 {
     if (parent::disable()) {
         foreach (Album::model()->findAll() as $album) {
             $album->delete();
         }
         $blacklisted_objects = explode(',', HSetting::Get('showFilesWidgetBlacklist', 'file'));
         if (false !== ($key = array_search('Album', $blacklisted_objects))) {
             unset($blacklisted_objects[$key]);
             HSetting::Set('showFilesWidgetBlacklist', implode(',', $blacklisted_objects));
         }
         HSetting::set('allowedExtensions', '', 'album');
         return true;
     }
     return false;
 }
 public function disable()
 {
     return parent::disable();
 }