public function getSelectedImage() { if (!$this->getAttribute('selectedImageId')) { return $this->getHoverImage(); } return $this->getRelationValue('selectedImage'); }