public function findNeighbors(Query $query, array $options)
    {
        $previous = $this->find()
            ->orderAsc($this->getAlias().'.modified')
            ->where($this->getAlias() . '.modified > \'' . $options['modified'] . '\'');
        $next = $this->find()
            ->orderDesc($this->getAlias().'.modified')
            ->where($this->getAlias() . '.modified < \'' . $options['modified'] . '\'');
        return ['prev' => $previous, 'next' => $next];
    }
public function findNeighbors(Query $query, array $options)
    {
        $previous = $this->find()
            ->orderAsc($this->getAlias().'.modified')
            ->where($this->getAlias() . '.modified > \'' . $options['modified'] . '\'');
        $next = $this->find()
            ->orderDesc($this->getAlias().'.modified')
            ->where($this->getAlias() . '.modified < \'' . $options['modified'] . '\'');
        return ['prev' => $previous, 'next' => $next];
    }
public function findNeighbors ( Query $ query , array $ options ) { $ previous = $ this -> find ( ) -> orderAsc ( $ this -> getAlias ( ) . '.modified' ) -> where ( $ this -> getAlias ( ) . '.modified > \'' . $ options [ 'modified' ] . '\'' ) ; $ next = $ this -> find ( ) -> orderDesc ( $ this -> getAlias ( ) . '.modified' ) -> where ( $ this -> getAlias ( ) . '.modified < \'' . $ options [ 'modified' ] . '\'' ) ; return [ 'prev' => $ previous , 'next' => $ next ] ; }
Find neighbors method
Find neighbors method