public function event($_value, $_loop = 1) { if ($this->getLogicalId() == 'nbimpulsionminute') { try { $calcul = $this->getConfiguration('calcul'); $calcul = preg_replace("/#brut#/", $_value, $calcul); $calcul = scenarioExpression::setTags($calcul); $test = new evaluate(); $result = $test->Evaluer($calcul); parent::event($result, $_loop); } catch (Exception $e) { $EqLogic = $this->getEqLogic(); log::add('ipx800', 'error', $EqLogic->getName() . " error in " . $this->getConfiguration('calcul') . " : " . $e->getMessage()); return scenarioExpression::setTags(str_replace('"', '', cmd::cmdToValue($this->getConfiguration('calcul')))); } } else { parent::event($_value, $_loop); } }