original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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.
docstring_tokens: Get element s Condition object