public function getImageIndex() { if ($this->_replacedImageIndex !== null) { return $this->_replacedImageIndex; } return parent::getImageIndex(); }