Пример #1
0
     $reply = $interactDef->selectReply();
     if (trim($reply) == '') {
         $reply = interactQuery::replyOk();
     }
     $return['reply'] = $reply;
 }
 if ($interactQuery->getLink_type() == 'whatDoYouKnow') {
     $object = object::byId($interactQuery->getLink_id());
     if (is_object($object)) {
         $reply = interactQuery::whatDoYouKnow($object);
         if (trim($reply) == '') {
             $return['reply'] = __('Je ne sais rien sur ', __FILE__) . $object->getName();
         }
         $return['reply'] = $reply;
     }
     $return['reply'] = interactQuery::whatDoYouKnow();
 }
 if ($interactQuery->getLink_type() == 'scenario') {
     $return['scenario'] = '';
     $scenario = scenario::byId($interactQuery->getLink_id());
     if (!is_object($scenario)) {
         $return['scenario'] = __('Impossible de trouver le scénario correspondant', __FILE__);
     }
     $return['scenario'] = '#' . $scenario->getHumanName() . '#';
     switch ($interactDef->getOptions('scenario_action')) {
         case 'start':
             $return['action'] = __('lancer', __FILE__);
             break;
         case 'stop':
             $return['action'] = __('arrêter', __FILE__);
             break;