ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ASS_AnswerBinaryStateImage Class Reference

Class for answers with a binary state indicator. More...

+ Inheritance diagram for ASS_AnswerBinaryStateImage:
+ Collaboration diagram for ASS_AnswerBinaryStateImage:

Public Member Functions

 __construct ($answertext="", $points=0.0, $order=0, $state=0, $a_image="", $id=-1)
 ASS_AnswerBinaryStateImage constructor. More...
 
 getImage ()
 Gets the image filename. More...
 
 setImage ($a_image=0)
 Sets the image filename. More...
 
- Public Member Functions inherited from ASS_AnswerBinaryState
 __construct ($answertext="", $points=0.0, $order=0, $state=0, $id=-1)
 ASS_AnswerBinaryState constructor. More...
 
 getState ()
 Gets the state. More...
 
 isStateChecked ()
 Gets the state. More...
 
 isStateSet ()
 Gets the state. More...
 
 isStateUnset ()
 Gets the state. More...
 
 isStateUnchecked ()
 Gets the state. More...
 
 setState ($state=0)
 Sets the state. More...
 
 setChecked ()
 Sets the answer as a checked answer. More...
 
 setSet ()
 Sets the answer as a set answer. More...
 
 setUnset ()
 Sets the answer as a unset answer. More...
 
 setUnchecked ()
 Sets the answer as a unchecked answer. More...
 
- Public Member Functions inherited from ASS_AnswerSimple
 __construct ($answertext="", $points=0.0, $order=0, $id=-1)
 ASS_AnswerSimple constructor. More...
 
 getId ()
 Gets the answer id. More...
 
 getAnswertext ()
 Gets the answer text. More...
 
 getPoints ()
 Gets the points. More...
 
 checkPoints ($a_points)
 Checks, if the point value is numeric. More...
 
 getOrder ()
 Gets the sort/display order. More...
 
 setOrder ($order=0)
 Sets the order. More...
 
 setId ($id=-1)
 Sets the answer id. More...
 
 setAnswertext ($answertext="")
 Sets the answer text. More...
 
 setPoints ($points=0.0)
 Sets the points. More...
 

Protected Attributes

 $image
 
- Protected Attributes inherited from ASS_AnswerBinaryState
 $state
 
- Protected Attributes inherited from ASS_AnswerSimple
 $answertext
 
 $points
 
 $order
 
 $id
 

Detailed Description

Class for answers with a binary state indicator.

ASS_AnswerBinaryStateImage is a class for answers with a binary state indicator (checked/unchecked, set/unset) and an image file

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$
See also
ASS_AnswerSimple

Definition at line 21 of file class.assAnswerBinaryStateImage.php.

Constructor & Destructor Documentation

◆ __construct()

ASS_AnswerBinaryStateImage::__construct (   $answertext = "",
  $points = 0.0,
  $order = 0,
  $state = 0,
  $a_image = "",
  $id = -1 
)

ASS_AnswerBinaryStateImage constructor.

The constructor takes possible arguments an creates an instance of the ASS_AnswerBinaryStateImage object.

Parameters
string$answertextA string defining the answer text
double$pointsThe number of points given for the selected answer
integer$orderA nonnegative value representing a possible display or sort order
integer$stateA integer value indicating the state of the answer
string$a_imageThe image filename
integer$idThe database id of the answer
Returns
ASS_AnswerBinaryStateImage

Definition at line 45 of file class.assAnswerBinaryStateImage.php.

References ASS_AnswerSimple\$answertext, ASS_AnswerSimple\$id, ASS_AnswerSimple\$order, ASS_AnswerSimple\$points, and image.

46  {
47  parent::__construct($answertext, $points, $order, $id);
48  $this->image = $a_image;
49  }
Generate an image

Member Function Documentation

◆ getImage()

ASS_AnswerBinaryStateImage::getImage ( )

Gets the image filename.

Returns the image filename

Returns
string The image filename
See also
$image

Definition at line 59 of file class.assAnswerBinaryStateImage.php.

References $image.

◆ setImage()

ASS_AnswerBinaryStateImage::setImage (   $a_image = 0)

Sets the image filename.

Sets the image filename

Parameters
int | string$a_imageThe image filename
See also
$image

Definition at line 73 of file class.assAnswerBinaryStateImage.php.

References image.

74  {
75  $this->image = $a_image;
76  }
Generate an image

Field Documentation

◆ $image

ASS_AnswerBinaryStateImage::$image
protected

Definition at line 29 of file class.assAnswerBinaryStateImage.php.

Referenced by getImage().


The documentation for this class was generated from the following file: