/**
  * Returns class instance
  *
  * @return NEWSFEED_BOL_CustomizationService
  */
 public static function getInstance()
 {
     if (null === self::$classInstance) {
         self::$classInstance = new self();
     }
     return self::$classInstance;
 }
Beispiel #2
0
 public function customization()
 {
     $language = OW::getLanguage();
     $this->setPageHeading($language->text('newsfeed', 'admin_page_heading'));
     $this->setPageTitle($language->text('newsfeed', 'admin_page_title'));
     $this->setPageHeadingIconClass('ow_ic_comment');
     $types = NEWSFEED_BOL_CustomizationService::getInstance()->getActionTypes();
     $form = new NEWSFEED_CustomizationForm();
     $this->addForm($form);
     $processTypes = array();
     foreach ($types as $type) {
         $field = new CheckboxField($type['activity']);
         $field->setValue($type['active']);
         $form->addElement($field);
         $processTypes[] = $type['activity'];
     }
     if (OW::getRequest()->isPost()) {
         $result = $form->process($_POST, $processTypes);
         if ($result) {
             OW::getFeedback()->info($language->text('newsfeed', 'customization_changed'));
         } else {
             OW::getFeedback()->warning($language->text('newsfeed', 'customization_not_changed'));
         }
         $this->redirect();
     }
     $this->assign('types', $types);
     $this->addComponent('menu', $this->getMenu());
 }
Beispiel #3
0
 private function testActivity($activityKey)
 {
     $disbledActivity = NEWSFEED_BOL_CustomizationService::getInstance()->getDisabledEntityTypes();
     if (empty($disbledActivity)) {
         return true;
     }
     return !$this->service->testActivityKey($activityKey, $disbledActivity);
 }