Public Member Functions

ilImageFileInputGUI Class Reference
[Services/Form]

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.

Detailed Description

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

Author:
Alex Killing <alex.killing@gmx.de>
Version:
$Id$

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


Constructor & Destructor Documentation

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

Constructor.

Parameters:
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:


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::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")." ".
                        $this->getMaxFileSizeString());
                $a_tpl->parseCurrentBlock();
        }

Here is the call graph for this function:

ilImageFileInputGUI::setAlt ( a_alt  ) 

Set Alternative Text.

Parameters:
string $a_alt Alternative Text

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

        {
                $this->alt = $a_alt;
        }

ilImageFileInputGUI::setImage ( a_image  ) 

Set Image.

Parameters:
string $a_image Image

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

        {
                $this->image = $a_image;
        }


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