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

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

+ Inheritance diagram for ilFlashFileInputGUI:
+ Collaboration diagram for ilFlashFileInputGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor.
 setApplet ($a_applet)
 Set applet.
 getApplet ()
 Get applet.
 getWidth ()
 Get width.
 setWidth ($a_width)
 Set width.
 getHeight ()
 Get height.
 setHeight ($a_height)
 Set height.
 getParameters ()
 Get parameters.
 setParameters ($a_parameters)
 Set parameters.
 addParameter ($name, $value)
 Add parameter.
 removeParameter ($name)
 Remove parameter.
 clearParameters ()
 Remove all parameters.
 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.

Protected Attributes

 $applet
 $width
 $height
 $parameters

Additional Inherited Members

- Protected Member Functions inherited from ilFileInputGUI
 outputSuffixes ($a_tpl, $a_block="allowed_suffixes")
 getMaxFileSizeString ()

Detailed Description

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

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
Id:
class.ilFlashFileInputGUI.php 18366 2009-01-07 10:05:08Z hschottm

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

Constructor & Destructor Documentation

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

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Reimplemented from ilFileInputGUI.

Definition at line 44 of file class.ilFlashFileInputGUI.php.

References ilFileInputGUI\setSuffixes(), and ilFormPropertyGUI\setType().

{
parent::__construct($a_title, $a_postvar);
$this->setType("flash_file");
$this->setSuffixes(array("swf"));
$this->width = 550;
$this->height = 400;
$this->parameters = array();
}

+ Here is the call graph for this function:

Member Function Documentation

ilFlashFileInputGUI::addParameter (   $name,
  $value 
)

Add parameter.

Parameters
string$nameParameter name
string$valueParameter value

Definition at line 140 of file class.ilFlashFileInputGUI.php.

{
$this->parameters[$name] = $value;
}
ilFlashFileInputGUI::clearParameters ( )

Remove all parameters.

Definition at line 158 of file class.ilFlashFileInputGUI.php.

{
$this->parameters = array();
}
ilFlashFileInputGUI::getApplet ( )

Get applet.

Returns
string Applet

Definition at line 69 of file class.ilFlashFileInputGUI.php.

References ilFileInputGUI\getFilename().

Referenced by insert().

{
return $this->getFilename();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilFlashFileInputGUI::getDeletionFlag ( )

Get deletion flag.

Definition at line 236 of file class.ilFlashFileInputGUI.php.

References ilFormPropertyGUI\getPostVar().

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

+ Here is the call graph for this function:

ilFlashFileInputGUI::getHeight ( )

Get height.

Returns
integer height

Definition at line 99 of file class.ilFlashFileInputGUI.php.

References $height.

Referenced by insert().

{
return $this->height;
}

+ Here is the caller graph for this function:

ilFlashFileInputGUI::getParameters ( )

Get parameters.

Returns
array Parameters

Definition at line 119 of file class.ilFlashFileInputGUI.php.

References $parameters.

Referenced by insert().

{
}

+ Here is the caller graph for this function:

ilFlashFileInputGUI::getWidth ( )

Get width.

Returns
integer width

Definition at line 79 of file class.ilFlashFileInputGUI.php.

References $width.

Referenced by insert().

{
return $this->width;
}

+ Here is the caller graph for this function:

ilFlashFileInputGUI::insert ( $a_tpl)

Insert property html.

Reimplemented from ilFileInputGUI.

Definition at line 166 of file class.ilFlashFileInputGUI.php.

References $lng, getApplet(), ilFormPropertyGUI\getFieldId(), getHeight(), ilFileInputGUI\getMaxFileSizeString(), getParameters(), ilFormPropertyGUI\getPostVar(), getWidth(), ILIAS_ABSOLUTE_PATH, ilYuiUtil\initConnectionWithAnimation(), and ilUtil\prepareFormOutput().

{
global $lng;
if ($this->getApplet() != "")
{
if (count($this->getParameters()))
{
$index = 0;
$params = array();
foreach ($this->getParameters() as $name => $value)
{
array_push($params, urlencode($name) . "=" . urlencode($value));
$a_tpl->setCurrentBlock("applet_param_input");
$a_tpl->setVariable("TEXT_NAME", $lng->txt("name"));
$a_tpl->setVariable("TEXT_VALUE", $lng->txt("value"));
$a_tpl->setVariable("PARAM_INDEX", $index);
$a_tpl->setVariable("POST_VAR_P", $this->getPostVar());
$a_tpl->setVariable("VALUE_NAME", "value=\"" . ilUtil::prepareFormOutput($name) . "\"");
$a_tpl->setVariable("VALUE_VALUE", "value=\"" . ilUtil::prepareFormOutput($value) . "\"");
$a_tpl->setVariable("TEXT_DELETE_PARAM", $lng->txt("delete_parameter"));
$a_tpl->parseCurrentBlock();
$index++;
}
$a_tpl->setCurrentBlock("applet_parameter");
$a_tpl->setVariable("PARAM_VALUE", join($params, "&"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("flash_vars");
$a_tpl->setVariable("PARAM_VALUE", join($params, "&"));
$a_tpl->parseCurrentBlock();
}
$a_tpl->setCurrentBlock("applet");
$a_tpl->setVariable("TEXT_ADD_PARAM", $lng->txt("add_parameter"));
$a_tpl->setVariable("APPLET_WIDTH", $this->getWidth());
$a_tpl->setVariable("APPLET_HEIGHT", $this->getHeight());
$a_tpl->setVariable("POST_VAR_D", $this->getPostVar());
$a_tpl->setVariable("TEXT_WIDTH", $lng->txt("width"));
$a_tpl->setVariable("TEXT_HEIGHT", $lng->txt("height"));
$a_tpl->setVariable("APPLET_FILE", str_replace(ILIAS_ABSOLUTE_PATH, ILIAS_HTTP_PATH, $this->getApplet()));
$a_tpl->setVariable("APPLET_PATH", str_replace(ILIAS_ABSOLUTE_PATH, ILIAS_HTTP_PATH, $this->getApplet()));
if ($this->getWidth()) $a_tpl->setVariable("VALUE_WIDTH", "value=\"" . $this->getWidth() . "\"");
if ($this->getHeight()) $a_tpl->setVariable("VALUE_HEIGHT", "value=\"" . $this->getHeight() . "\"");
$a_tpl->setVariable("ID", $this->getFieldId());
$a_tpl->setVariable("TXT_DELETE_EXISTING",
$lng->txt("delete_existing_file"));
$a_tpl->parseCurrentBlock();
}
$js_tpl = new ilTemplate('tpl.flashAddParam.js', true, true, 'Services/Form');
$js_tpl->setVariable("TEXT_NAME", $lng->txt("name"));
$js_tpl->setVariable("TEXT_VALUE", $lng->txt("value"));
$js_tpl->setVariable("POST_VAR", $this->getPostVar());
$js_tpl->setVariable("TEXT_DELETE_PARAM", $lng->txt("delete_parameter"));
$js_tpl->setVariable("TEXT_CONFIRM_DELETE_PARAMETER", $lng->txt("confirm_delete_parameter"));
$a_tpl->setCurrentBlock("prop_flash_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->setVariable("JAVASCRIPT_FLASH", $js_tpl->get());
$a_tpl->parseCurrentBlock();
include_once "./Services/YUI/classes/class.ilYuiUtil.php";
}

+ Here is the call graph for this function:

ilFlashFileInputGUI::removeParameter (   $name)

Remove parameter.

Parameters
string$nameParameter name

Definition at line 150 of file class.ilFlashFileInputGUI.php.

{
unset($this->parameters[$name]);
}
ilFlashFileInputGUI::setApplet (   $a_applet)

Set applet.

Parameters
string$a_appletApplet

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

References ilFileInputGUI\setFilename().

{
$this->setFilename($a_applet);
}

+ Here is the call graph for this function:

ilFlashFileInputGUI::setHeight (   $a_height)

Set height.

Parameters
integer$a_heightheight

Definition at line 109 of file class.ilFlashFileInputGUI.php.

{
$this->height = $a_height;
}
ilFlashFileInputGUI::setParameters (   $a_parameters)

Set parameters.

Parameters
array$a_parametersParameters

Definition at line 129 of file class.ilFlashFileInputGUI.php.

{
$this->parameters = $a_parameters;
}
ilFlashFileInputGUI::setWidth (   $a_width)

Set width.

Parameters
integer$a_widthwidth

Definition at line 89 of file class.ilFlashFileInputGUI.php.

{
$this->width = $a_width;
}

Field Documentation

ilFlashFileInputGUI::$applet
protected

Definition at line 33 of file class.ilFlashFileInputGUI.php.

ilFlashFileInputGUI::$height
protected

Definition at line 35 of file class.ilFlashFileInputGUI.php.

Referenced by getHeight().

ilFlashFileInputGUI::$parameters
protected

Definition at line 36 of file class.ilFlashFileInputGUI.php.

Referenced by getParameters().

ilFlashFileInputGUI::$width
protected

Definition at line 34 of file class.ilFlashFileInputGUI.php.

Referenced by getWidth().


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