unset($this->style['widgets']['Actions']);
}
- // I *think* this is more efficient, iterate over the children
- // since we already have them instead of calling listImages.
- //$image_ids = $this->view->gallery->listImages($this->pagestart, $this->pagestart + $this->perpage);
- $ids = array();
- foreach ($this->children as $child) {
- if ($child instanceof Ansel_Image) {
- $ids[] = $child->id;
- }
- }
// Gallery widgets always receive an array of image ids for
// the current page.
+ $ids = $this->getChildImageIds();
foreach ($this->style['widgets'] as $wname => $wparams) {
$wparams = array_merge($wparams, array('images' => $ids));
$this->view->addWidget(Ansel_Widget::factory($wname, $wparams));
$this->pageend = min($this->numTiles, $this->pagestart + $this->perpage - 1);
}
+ public function getChildImageIds()
+ {
+ $ids = array();
+ foreach ($this->children as $child) {
+ if ($child instanceof Ansel_Image) {
+ $ids[] = $child->id;
+ }
+ }
+ return $ids;
+ }
+
/**
* Return the HTML for this view. Done this way so we can override this in
* subclasses if desired.