> */ private array $maps = array(); /** * Condition registry. * * @var ConditionRegistry */ private ConditionRegistry $registry; /** * Shared condition vocabulary. * * @var ConditionCatalog */ private ConditionCatalog $catalog; /** * Constructor. * * @param ConditionRegistry $registry Condition registry. * @param ConditionCatalog $catalog Shared condition vocabulary. */ public function __construct( ConditionRegistry $registry, ConditionCatalog $catalog ) { $this->registry = $registry; $this->catalog = $catalog; } /** * Returns the translated label for a condition type. * * @param string $type Condition type id. * @return string */ public function type_label( string $type ): string { if ( $this->registry->has( $type ) ) { return $this->registry->get( $type )->label(); } /* translators: %s: condition type identifier. */ return sprintf( __( 'Unknown (%s)', 'blocksieve' ), $type ); } /** * Formats one stored condition as "