Beispiel #1
0
 /**
  * Calls parent::__construct - note array $choices is not required
  *
  * @param string $name setting name
  * @param string $visiblename localised setting name
  * @param string $description setting description
  * @param array $defaultsetting a plain array of default module ids
  * @param bool $excludesystem If true, excludes modules with 'system' archetype
  */
 public function __construct($name, $visiblename, $description, $defaultsetting = array(), $excludesystem = true)
 {
     parent::__construct($name, $visiblename, $description, $defaultsetting, null);
     $this->excludesystem = $excludesystem;
 }
Beispiel #2
0
 /**
  * Calls parent::__construct - note array $choices is not required
  *
  * @param string $name setting name
  * @param string $visiblename localised setting name
  * @param string $description setting description
  * @param array $defaultsetting a plain array of default module ids
  */
 public function __construct($name, $visiblename, $description, $defaultsetting = array())
 {
     parent::__construct($name, $visiblename, $description, $defaultsetting, null);
 }
Beispiel #3
0
 /**
  * Save the chosen setting provided as $data
  *
  * @param array $data
  * @return mixed string or array
  */
 public function write_setting($data)
 {
     // If all is selected, remove any explicit options.
     if (in_array('$@ALL@$', $data)) {
         $data = array('$@ALL@$');
     }
     // None never needs to be writted to the DB.
     if (in_array('$@NONE@$', $data)) {
         unset($data[array_search('$@NONE@$', $data)]);
     }
     return parent::write_setting($data);
 }
Beispiel #4
0
 /**
  * Calls parent::__construct - note array $choices is not required
  *
  * @param string $name setting name
  * @param string $visiblename localised setting name
  * @param string $description setting description
  */
 public function __construct($name, $visiblename, $description) {
     parent::__construct($name, $visiblename, $description, array(), null);
 }