ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilImageFileInputGUI Class Reference

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.
 getDeletionFlag ()
 Get deletion flag.
- Public Member Functions inherited from ilFileInputGUI
 setValueByArray ($a_values)
 Set value by array.
 setValue ($a_value)
 Set Value.
 getValue ()
 Get Value.
 setFilename ($a_val)
 Set filename value (if filename selection is enabled)
 getFilename ()
 Get Value.
 setSuffixes ($a_suffixes)
 Set Accepted Suffixes.
 getSuffixes ()
 Get Accepted Suffixes.
 enableFileNameSelection ($a_post_var)
 If enabled, users get the possibility to enter a filename for the uploaded file.
 isFileNameSelectionEnabled ()
 Check if filename selection is enabled.
 getFileNamePostVar ()
 Get file name post var.
 checkInput ()
 Check input, strip slashes etc.
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem.
 getSubItems ()
 Get Subitems.
 setSubformMode ($a_subformmode)
 Set Subform Mode.
 getSubformMode ()
 Get Subform Mode.
 checkSubItemsInput ()
 Check SubItems.
 getSubForm ()
 Get sub form html.
- Public Member Functions inherited from ilFormPropertyGUI
 getType ()
 Get Type.
 setTitle ($a_title)
 Set Title.
 getTitle ()
 Get Title.
 setPostVar ($a_postvar)
 Set Post Variable.
 getPostVar ()
 Get Post Variable.
 getFieldId ()
 Get Post Variable.
 setInfo ($a_info)
 Set Information Text.
 getInfo ()
 Get Information Text.
 setAlert ($a_alert)
 Set Alert Text.
 getAlert ()
 Get Alert Text.
 setRequired ($a_required)
 Set Required.
 getRequired ()
 Get Required.
 setDisabled ($a_disabled)
 Set Disabled.
 getDisabled ()
 Get Disabled.

Additional Inherited Members

- Protected Member Functions inherited from ilFileInputGUI
 outputSuffixes ($a_tpl, $a_block="allowed_suffixes")
 getMaxFileSizeString ()
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 $subformmode = "bottom"

Detailed Description

This class represents an image file property in a property form.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 31 of file class.ilImageFileInputGUI.php.

Constructor & Destructor Documentation

ilImageFileInputGUI::__construct (   $a_title = "",
  $a_postvar = "" 
)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost 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:

Member Function Documentation

ilImageFileInputGUI::getAlt ( )

Get Alternative Text.

Returns
string 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::getDeletionFlag ( )

Get deletion flag.

Definition at line 118 of file class.ilImageFileInputGUI.php.

References ilFormPropertyGUI\getPostVar().

{
if ($_POST[$this->getPostVar()."_delete"])
{
return true;
}
return false;
}

+ Here is the call graph for this function:

ilImageFileInputGUI::getImage ( )

Get Image.

Returns
string 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")." ".
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilImageFileInputGUI::setAlt (   $a_alt)

Set Alternative Text.

Parameters
string$a_altAlternative Text

Definition at line 72 of file class.ilImageFileInputGUI.php.

{
$this->alt = $a_alt;
}
ilImageFileInputGUI::setImage (   $a_image)

Set Image.

Parameters
string$a_imageImage

Definition at line 52 of file class.ilImageFileInputGUI.php.

Referenced by ilObjUserGUI\initForm(), and ilPersonalProfileGUI\initForm().

{
$this->image = $a_image;
}

+ Here is the caller graph for this function:


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