/**
  * Overrides CqAbstractMapping::getAllText()
  */
 public function getAllText()
 {
     $retval = array();
     $retval['logic']['#markup'] = 'NOT';
     $retval += parent::getAllText();
     return $retval;
 }
 /**
  * Overrides CqAbstractMapping::getAllText()
  */
 public function getAllText()
 {
     $choiceId = $this->getParam('inlinechoice');
     $value = $this->getParam('value');
     $minval = $this->getParam('minval');
     if (is_null($minval)) {
         $minval = '-∞';
     } else {
         $minval = check_plain($minval);
     }
     $maxval = $this->getParam('maxval');
     if (is_null($maxval)) {
         $maxval = '∞';
     } else {
         $maxval = check_plain($maxval);
     }
     $retval = array();
     if (!is_null($choiceId)) {
         $retval['logic']['#markup'] = t('Range: choiceId=%id, minval=!minval, maxval=!maxval.', array('%id' => $choiceId, '!minval' => $minval, '!maxval' => $maxval));
     } elseif (!is_null($value)) {
         $retval['logic']['#markup'] = t('Range: value=%id, minval=!minval, maxval=!maxval.', array('%id' => $value, '!minval' => $minval, '!maxval' => $maxval));
     } else {
         $retval['logic']['#markup'] = t('Range: minval=!minval, maxval=!maxval.', array('!minval' => $minval, '!maxval' => $maxval));
     }
     $retval += parent::getAllText();
     return $retval;
 }
Esempio n. 3
0
 /**
  * Overrides CqAbstractMapping::getAllText()
  */
 public function getAllText()
 {
     $inlinechoice = $this->getParam('inlinechoice');
     $optionId = $this->getParam('inlineoption');
     $pattern = $this->getParam('pattern');
     $matchAll = $this->getParam('matchall');
     $hotspotId = $this->getParam('hotspot');
     $hotspotPattern = $this->getParam('hotspotpattern');
     $draggableId = $this->getParam('draggable');
     $draggablePattern = $this->getParam('draggablepattern');
     if (!is_null($hotspotId) && !is_null($hotspotPattern)) {
         drupal_set_message(t('Match with both hotspot and hotspotpattern set!'), 'warning');
     }
     if (!is_null($hotspotId) && is_null($hotspotPattern)) {
         $hotspotPattern = $hotspotId;
     }
     if (!is_null($draggableId) && !is_null($draggablePattern)) {
         drupal_set_message(t('Match with both draggable and draggablepattern set!'), 'warning');
     }
     if (!is_null($draggableId) && is_null($draggablePattern)) {
         $draggablePattern = $draggableId;
     }
     $retval = array();
     $retval['logic']['#markup'] = t('Match %choice %hotspot against %option %draggable %pattern', array('%choice' => $inlinechoice, '%hotspot' => $hotspotPattern, '%option' => $optionId, '%pattern' => $pattern, '%draggable' => $draggablePattern));
     if (!is_null($matchAll)) {
         $retval['logic']['#markup'] .= t('<br/>Match all = %matchall', array('%matchall' => $matchAll));
     }
     $retval += parent::getAllText();
     return $retval;
 }