class CControllerPopupConditionEventCorr extends CControllerPopupConditionCommon {
protected function getCheckInputs() {
'type' => 'required|in '.ZBX_POPUP_CONDITION_TYPE_EVENT_CORR,
'condition_type' => 'not_empty|in '.implode(',', [ZBX_CORR_CONDITION_OLD_EVENT_TAG, ZBX_CORR_CONDITION_NEW_EVENT_TAG, ZBX_CORR_CONDITION_NEW_EVENT_HOSTGROUP, ZBX_CORR_CONDITION_EVENT_TAG_PAIR, ZBX_CORR_CONDITION_OLD_EVENT_TAG_VALUE, ZBX_CORR_CONDITION_NEW_EVENT_TAG_VALUE]),
'operator' => 'not_empty|in '.implode(',', [CONDITION_OPERATOR_EQUAL, CONDITION_OPERATOR_NOT_EQUAL, CONDITION_OPERATOR_LIKE, CONDITION_OPERATOR_NOT_LIKE])
protected function getConditionLastType() {
$last_type = CProfile::get('popup.condition.events_last_type', ZBX_CORR_CONDITION_OLD_EVENT_TAG);
if ($this->hasInput('condition_type') && $this->getInput('condition_type') != $last_type) {
CProfile::update('popup.condition.events_last_type', $this->getInput('condition_type'), PROFILE_TYPE_INT);
$last_type = $this->getInput('condition_type');
protected function validateFieldsManually() {
$validator = new CEventCorrCondValidator();
$is_valid = $validator->validate([
'type' => $this->getInput('condition_type'),
'operator' => $this->getInput('operator'),
'tag' => getRequest('tag'),
'oldtag' => getRequest('oldtag'),
'newtag' => getRequest('newtag'),
'value' => getRequest('value'),
'groupids' => getRequest('groupids')
error($validator->getError());