public function beforeFind(Event $event, Query $query, $options, $primary) {
		$order = $query->clause('order');
		if (($order === null || !count($order)) && !empty($this->order)) {
			$query->order($this->order);
		}

		return $query;
	}
public function beforeFind(Event $event, Query $query, $options, $primary) {
		$order = $query->clause('order');
		if (($order === null || !count($order)) && !empty($this->order)) {
			$query->order($this->order);
		}

		return $query;
	}
public function beforeFind ( Event $ event , Query $ query , $ options , $ primary ) { $ order = $ query -> clause ( 'order' ) ; if ( ( $ order === null || ! count ( $ order ) ) && ! empty ( $ this -> order ) ) { $ query -> order ( $ this -> order ) ; } return $ query ; }
Sets the default ordering as 2.x shim.

If you don't want that, don't call parent when overwriting it in extending classes.

@param \Cake\Event\Event $event
@param \Cake\ORM\Query $query
@param array $options
@param bool $primary
@return \Cake\ORM\Query
Sets the default ordering as 2 . x shim .