Listing 19.8. Metoda getPrevious() klasy WskaznikKategorii
function getPrevious()
{
  if ($this->ptr_current) {
    $c = new Criteria();
    $c->add(KategoriaPeer::DVD_ID, $this->options->getDvdId());
    $c->add(KategoriaPeer::SLUG, $this->ptr_current->getSlug(), Criteria::LESS_THAN);
    $c->setLimit(1);
    $c->addDescendingOrderByColumn(KategoriaPeer::SLUG);
    if ($tmp = KategoriaPeer::doSelectOne($c)) {
      $this->ptr_previous = $tmp;
    }
  }
}
