SproutCMS

This is the code documentation for the SproutCMS project

class DisplayCondition

Base class for display conditions

This is known as the Context Engine, and is a set of display rules which affect
which widgets (content blocks) are shown or hidden on the page

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2026-09-16
**/
class NewClassName extends DisplayCondition {
    
    /**
    * Does a given condition match?
    **/
    public function match (array $env, string $op, string $val) {
        // Method code goes here
    }
    
    /**
    * Return the available values for dropdowns
    **/
    public function getParamValues () {
        // Method code goes here
    }
    
    /**
    * Return the type of parameter for UI display
    * Only two types are supported - 'text' or 'dropdown'
    **/
    public function getParamType () {
        // Method code goes here
    }
    
    /**
    * Return the list of operators for the condition value
    * Common values would be 'equals', 'not equals', 'less than', 'contains', etc
    **/
    public function getOperators () {
        // Method code goes here
    }
    
}
?>