This class represents an image file property in a property form. More...
Inheritance diagram for ilImageFileInputGUI:
Collaboration diagram for ilImageFileInputGUI:Public Member Functions | |
| __construct ($a_title="", $a_postvar="") | |
| Constructor. | |
| setImage ($a_image) | |
| Set Image. | |
| getImage () | |
| Get Image. | |
| setAlt ($a_alt) | |
| Set Alternative Text. | |
| getAlt () | |
| Get Alternative Text. | |
| insert (&$a_tpl) | |
| Insert property html. | |
This class represents an image file property in a property form.
Definition at line 31 of file class.ilImageFileInputGUI.php.
| ilImageFileInputGUI::__construct | ( | $ | a_title = "", |
|
| $ | a_postvar = "" | |||
| ) |
Constructor.
| string | $a_title Title | |
| string | $a_postvar Post Variable |
Reimplemented from ilFileInputGUI.
Definition at line 40 of file class.ilImageFileInputGUI.php.
References ilFileInputGUI::setSuffixes(), and ilFormPropertyGUI::setType().
{
parent::__construct($a_title, $a_postvar);
$this->setType("image_file");
$this->setSuffixes(array("jpg", "jpeg", "png", "gif"));
}
Here is the call graph for this function:| ilImageFileInputGUI::getAlt | ( | ) |
Get Alternative Text.
Definition at line 82 of file class.ilImageFileInputGUI.php.
Referenced by insert().
{
return $this->alt;
}
Here is the caller graph for this function:| ilImageFileInputGUI::getImage | ( | ) |
Get Image.
Definition at line 62 of file class.ilImageFileInputGUI.php.
Referenced by insert().
{
return $this->image;
}
Here is the caller graph for this function:| ilImageFileInputGUI::insert | ( | &$ | a_tpl | ) |
Insert property html.
Reimplemented from ilFileInputGUI.
Definition at line 90 of file class.ilImageFileInputGUI.php.
References $lng, getAlt(), ilFormPropertyGUI::getFieldId(), getImage(), ilFileInputGUI::getMaxFileSizeString(), ilFormPropertyGUI::getPostVar(), and ilFileInputGUI::outputSuffixes().
{
global $lng;
$this->outputSuffixes($a_tpl, "allowed_image_suffixes");
if ($this->getImage() != "")
{
$a_tpl->setCurrentBlock("image");
$a_tpl->setVariable("SRC_IMAGE", $this->getImage());
$a_tpl->setVariable("ALT_IMAGE", $this->getAlt());
$a_tpl->setVariable("POST_VAR_D", $this->getPostVar());
$a_tpl->setVariable("TXT_DELETE_EXISTING",
$lng->txt("delete_existing_file"));
$a_tpl->parseCurrentBlock();
}
$a_tpl->setCurrentBlock("prop_image_file");
$a_tpl->setVariable("POST_VAR", $this->getPostVar());
$a_tpl->setVariable("ID", $this->getFieldId());
$a_tpl->setVariable("TXT_MAX_SIZE", $lng->txt("file_notice")." ".
$this->getMaxFileSizeString());
$a_tpl->parseCurrentBlock();
}
Here is the call graph for this function:| ilImageFileInputGUI::setAlt | ( | $ | a_alt | ) |
Set Alternative Text.
| string | $a_alt Alternative Text |
Definition at line 72 of file class.ilImageFileInputGUI.php.
{
$this->alt = $a_alt;
}
| ilImageFileInputGUI::setImage | ( | $ | a_image | ) |
Set Image.
| string | $a_image Image |
Definition at line 52 of file class.ilImageFileInputGUI.php.
{
$this->image = $a_image;
}
1.7.1