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 getItemsCount() { $this->__load(); return parent::getItemsCount(); }
/** * Set defaults by given entity * * @param Newscoop\Package\Package $package * @return Admin_Form_Slideshow */ public function setDefaultsFromEntity(\Newscoop\Package\Package $package) { $this->setDefaults(array('headline' => $package->getHeadline(), 'slug' => $package->getSlug())); return $this; }