Model/Behavior/SoftDeleteBehavior.php
public function beforeFind(Model $model, $query) {

		$runtime = $this->runtime[$model->alias];
		if ($runtime) {
			if (!is_array($query['conditions'])) {
				$query['conditions'] = array();
			}
			$conditions = array_filter(array_keys($query['conditions']));

			$fields = $this->_normalizeFields($model);

			foreach ($fields as $flag => $date) {
				if (true === $runtime || $flag === $runtime) {
					if (!in_array($flag, $conditions) && !in_array($model->name . '.' . $flag, $conditions)) {
						$query['conditions'][$model->alias . '.' . $flag] = false;
					}

					if ($flag === $runtime) {
						break;
					}
				}
			}
			return $query;
		}
	}
public function beforeFind(Model $model, $query) {

		$runtime = $this->runtime[$model->alias];
		if ($runtime) {
			if (!is_array($query['conditions'])) {
				$query['conditions'] = array();
			}
			$conditions = array_filter(array_keys($query['conditions']));

			$fields = $this->_normalizeFields($model);

			foreach ($fields as $flag => $date) {
				if (true === $runtime || $flag === $runtime) {
					if (!in_array($flag, $conditions) && !in_array($model->name . '.' . $flag, $conditions)) {
						$query['conditions'][$model->alias . '.' . $flag] = false;
					}

					if ($flag === $runtime) {
						break;
					}
				}
			}
			return $query;
		}
	}
public function beforeFind ( Model $ model , $ query ) { $ runtime = $ this -> runtime [ $ model -> alias ] ; if ( $ runtime ) { if ( ! is_array ( $ query [ 'conditions' ] ) ) { $ query [ 'conditions' ] = array ( ) ; } $ conditions = array_filter ( array_keys ( $ query [ 'conditions' ] ) ) ; $ fields = $ this -> _normalizeFields ( $ model ) ; foreach ( $ fields as $ flag => $ date ) { if ( true === $ runtime || $ flag === $ runtime ) { if ( ! in_array ( $ flag , $ conditions ) && ! in_array ( $ model -> name . '.' . $ flag , $ conditions ) ) { $ query [ 'conditions' ] [ $ model -> alias . '.' . $ flag ] = false ; } if ( $ flag === $ runtime ) { break ; } } } return $ query ; } }
Before find callback

@param Model $model
@param array $query
@return array
Before find callback