public static function formatStatusRuleType(int $type, int $new_status, int $number, int $status): string {
<?php declare(strict_types = 0);
public static function getAlgorithmNames(): array {
ZBX_SERVICE_STATUS_CALC_MOST_CRITICAL_ONE => _('Most critical of child services'),
ZBX_SERVICE_STATUS_CALC_MOST_CRITICAL_ALL => _('Most critical if all children have problems'),
ZBX_SERVICE_STATUS_CALC_SET_OK => _('Set status to OK')
public static function getStatusRuleTypeOptions(): array {
ZBX_SERVICE_STATUS_RULE_TYPE_N_GE => _s(
'If at least %2$s child services have %1$s status or above',
(new CSpan(_('Status')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER),
(new CSpan(_('N')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER)
ZBX_SERVICE_STATUS_RULE_TYPE_NP_GE => _s(
'If at least %2$s of child services have %1$s status or above',
(new CSpan(_('Status')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER),
(new CSpan(_('N%')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER)
ZBX_SERVICE_STATUS_RULE_TYPE_N_L => _s(
'If less than %2$s child services have %1$s status or below',
(new CSpan(_('Status')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER),
(new CSpan(_('N')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER)
ZBX_SERVICE_STATUS_RULE_TYPE_NP_L => _s(
'If less than %2$s of child services have %1$s status or below',
(new CSpan(_('Status')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER),
(new CSpan(_('N%')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER)
ZBX_SERVICE_STATUS_RULE_TYPE_W_GE => _s(
'If weight of child services with %1$s status or above is at least %2$s',
(new CSpan(_('Status')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER),
(new CSpan(_('W')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER)
ZBX_SERVICE_STATUS_RULE_TYPE_WP_GE => _s(
'If weight of child services with %1$s status or above is at least %2$s',
(new CSpan(_('Status')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER),
(new CSpan(_('N%')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER)
ZBX_SERVICE_STATUS_RULE_TYPE_W_L => _s(
'If weight of child services with %1$s status or below is less than %2$s',
(new CSpan(_('Status')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER),
(new CSpan(_('W')))->addClass(ZBX_STYLE_TEXT_PLACEHOLDER)