Example #1
0
 /**
  * Set a javascript variable.
  *
  * @param string $var
  *   The name of the variable.
  * @param mixed $value
  *   The new value.
  */
 public static function set($var, $value) {
     Data::setInPath($var, $value, self::$vars);
 }
Example #2
0
 /**
  * Gets a var from the returned data.
  *
  * Communicator data is wrapped in a 'data' field.
  *
  * @param $var
  * @return null
  */
 function get($var)
 {
     if (!empty($this->results['data'])) {
         return Data::getFromPath($var, $this->results['data']);
     }
 }
Example #3
0
 /**
  * Remove a setting from the session.
  *
  * @param string $field
  *   The field name
  */
 public function unsetSetting($field)
 {
     Data::removeFromPath($field, $this->content);
 }