original_string: public function getNotEmptyMessage($field)
      {
          if (!isset($this->_fields[$field])) {
              return null;
          }
  
          $defaultMessage = 'This field cannot be left empty';
          if ($this->_useI18n) {
              $defaultMessage = __d('cake', 'This field cannot be left empty');
          }
  
          $notBlankMessage = null;
          foreach ($this->_fields[$field] as $rule) {
              if ($rule->get('rule') === 'notBlank' && $rule->get('message')) {
                  return $rule->get('message');
              }
          }
  
          return isset($this->_allowEmptyMessages[$field])
              ? $this->_allowEmptyMessages[$field]
              : $defaultMessage;
      }
code: public function getNotEmptyMessage($field)
      {
          if (!isset($this->_fields[$field])) {
              return null;
          }
  
          $defaultMessage = 'This field cannot be left empty';
          if ($this->_useI18n) {
              $defaultMessage = __d('cake', 'This field cannot be left empty');
          }
  
          $notBlankMessage = null;
          foreach ($this->_fields[$field] as $rule) {
              if ($rule->get('rule') === 'notBlank' && $rule->get('message')) {
                  return $rule->get('message');
              }
          }
  
          return isset($this->_allowEmptyMessages[$field])
              ? $this->_allowEmptyMessages[$field]
              : $defaultMessage;
      }
code_tokens: public function getNotEmptyMessage ( $ field ) { if ( ! isset ( $ this -> _fields [ $ field ] ) ) { return null ; } $ defaultMessage = 'This field cannot be left empty' ; if ( $ this -> _useI18n ) { $ defaultMessage = __d ( 'cake' , 'This field cannot be left empty' ) ; } $ notBlankMessage = null ; foreach ( $ this -> _fields [ $ field ] as $ rule ) { if ( $ rule -> get ( 'rule' ) === 'notBlank' && $ rule -> get ( 'message' ) ) { return $ rule -> get ( 'message' ) ; } } return isset ( $ this -> _allowEmptyMessages [ $ field ] ) ? $ this -> _allowEmptyMessages [ $ field ] : $ defaultMessage ; }
docstring: Gets the notEmpty message for a field
  
  @param string $field Field name
  @return string|null
docstring_tokens: Gets the notEmpty message for a field