Example #1
0
 /**
  * Called by form model to build an array of values to encrypt
  *
  * @param   array  &$values  Previously encrypted values
  * @param   array  $data     Form data
  * @param   int    $c        Repeat group counter
  *
  * @return  void
  */
 public function getValuesToEncrypt(&$values, $data, $c)
 {
     $displayType = $this->getDisplayType();
     if ($displayType == 'checkbox' || $displayType == 'multilist') {
         $name = $this->getFullName(true, false);
         $group = $this->getGroup();
         if ($group->canRepeat()) {
             if (!array_key_exists($name, $values)) {
                 $values[$name]['data'] = array();
             }
             $values[$name]['data'][$c] = $this->multiOptionTargetIds($data, $c);
         } else {
             $values[$name]['data'] = $this->multiOptionTargetIds($data, $c);
         }
     } else {
         parent::getValuesToEncrypt($values, $data, $c);
     }
 }