Esempio n. 1
0
 /**
  *
  *
  * @since	1.2
  * @access	public
  * @param	string
  * @return
  */
 public function onRegisterBeforeSave(&$post, SocialGroup $group)
 {
     // We need to know if the news app is published
     if (!$this->appEnabled()) {
         return;
     }
     // Get the posted value
     $value = isset($post[$this->inputName]) ? $post[$this->inputName] : $this->params->get('default', true);
     $value = (bool) $value;
     $registry = $group->getParams();
     $registry->set('news', $value);
     $group->params = $registry->toString();
 }
Esempio n. 2
0
 /**
  * Before the form is saved, we need to store these data into the group properties
  *
  * @since   1.3
  * @access  public
  * @param   string
  * @return  
  */
 public function onBeforeSave(&$post, SocialGroup &$group)
 {
     $value = !empty($post['stream_moderation']) ? $post['stream_moderation'] : array();
     // Set it into the group params so that we can retrieve this later
     $params = $group->getParams();
     $params->set('stream_moderation', $value);
     $group->params = $params->toString();
     unset($post['stream_moderation']);
 }