getPrev() public method

Get previous item
public getPrev ( Item $currentItem ) : Newscoop\Package\Item
$currentItem Item
return Newscoop\Package\Item
示例#1
0
 public function testPrevNextItem()
 {
     $package = new Package();
     $first = new Item($package, new LocalImage('first'));
     $this->assertNull($package->getPrev($first));
     $this->assertNull($package->getNext($first));
     $second = new Item($package, new LocalImage('second'));
     $this->assertEquals($first, $package->getPrev($second));
     $this->assertEquals($second, $package->getNext($first));
 }
 public function getPrev(\Newscoop\Package\Item $currentItem)
 {
     $this->__load();
     return parent::getPrev($currentItem);
 }