/** * Create a new HotspotInteraction object. * * @param string $responseIdentifier The identifier of the response associated to the interaction. * @param \qtism\data\content\xhtml\Object $object The associated image given as an Object object. * @param integer $maxChoices The maximum number of choices the candidate is allowed to select as a positive (>= 0) integer. * @param \qtism\data\content\interactions\HotspotChoiceCollection $hotspotChoices The collection of HotspotChoice objects composing the HotspotInteraction. * @param string $id The id of the bodyElement. * @param string $class The class of the bodyElement. * @param string $lang The language of the bodyElement. * @param string $label The label of the bodyElement. * @throws \InvalidArgumentException */ public function __construct($responseIdentifier, Object $object, $maxChoices, HotspotChoiceCollection $hotspotChoices, $id = '', $class = '', $lang = '', $label = '') { parent::__construct($responseIdentifier, $object, $id, $class, $lang, $label); $this->setMaxChoices($maxChoices); $this->setHotspotChoices($hotspotChoices); }
/** * Create a new GraphicAssociateInteraction. * * @param string $responseIdentifier The identifier of the associated response. * @param Object $object The associated image as an Object object. * @param AssociableHotspotCollection $associableHotspots The hotspots that define the choices that are to be associated by the candidate. * @param string $id The id of the bodyElement. * @param string $class The class of the bodyElement. * @param string $lang The language of the bodyElement. * @param string $label The label of the bodyElement. * @throws InvalidArgumentException If one of the argument is invalid. */ public function __construct($responseIdentifier, Object $object, AssociableHotspotCollection $associableHotspots, $id = '', $class = '', $lang = '', $label = '') { parent::__construct($responseIdentifier, $object, $id, $class, $lang, $label); $this->setAssociableHotspots($associableHotspots); }