public function getCondition($strProperty)
    {
        $objReturn = null;

        $objConditions = $this->getConditions();
        foreach ($objConditions as $objCondition) {
            if ($objCondition->getProperty() === strtolower($strProperty)) {
                $objReturn = $objCondition;
                break;
            }
        }

        if (is_null($objReturn) && is_object($this->__parent)) {
            // *** Find condition in parent.
            $objReturn = $this->__parent->getCondition($strProperty);
        }

        return $objReturn;
    }
public function getCondition($strProperty)
    {
        $objReturn = null;

        $objConditions = $this->getConditions();
        foreach ($objConditions as $objCondition) {
            if ($objCondition->getProperty() === strtolower($strProperty)) {
                $objReturn = $objCondition;
                break;
            }
        }

        if (is_null($objReturn) && is_object($this->__parent)) {
            // *** Find condition in parent.
            $objReturn = $this->__parent->getCondition($strProperty);
        }

        return $objReturn;
    }
public function getCondition ( $ strProperty ) { $ objReturn = null ; $ objConditions = $ this -> getConditions ( ) ; foreach ( $ objConditions as $ objCondition ) { if ( $ objCondition -> getProperty ( ) === strtolower ( $ strProperty ) ) { $ objReturn = $ objCondition ; break ; } } if ( is_null ( $ objReturn ) && is_object ( $ this -> __parent ) ) { // *** Find condition in parent. $ objReturn = $ this -> __parent -> getCondition ( $ strProperty ) ; } return $ objReturn ; }
Get element's Condition object

Note: When chaining methods, always use hasCondition() first before chaining
for example `getCondition()->isMet()`.

@param string $strProperty Condition type e.g. 'required', 'visibile' and 'enabled'
@return Condition|null Found condition or null if no condition is found.
Get element s Condition object