ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCopyrightInputGUI Class Reference

This class represents a copyright property in a property form. More...

+ Inheritance diagram for ilCopyrightInputGUI:
+ Collaboration diagram for ilCopyrightInputGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor.
 setValue ($a_value)
 Set Value.
 getValue ()
 Get Value.
 setCols ($a_cols)
 Set Cols.
 getCols ()
 Get Cols.
 setRows ($a_rows)
 Set Rows.
 getRows ()
 Get Rows.
 setValueByArray ($a_values)
 Set value by array.
 checkInput ()
 Check input, strip slashes etc.
 insert (&$a_tpl)
 Insert property html.
- Public Member Functions inherited from ilFormPropertyGUI
executeCommand ()
 Execute command.
 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.
 setParentForm ($a_parentform)
 Set Parent Form.
 getParentForm ()
 Get Parent Form.
 setParent ($a_val)
 Set Parent GUI object.
 getParent ()
 Get Parent GUI object.
 getSubForm ()
 Get sub form html.
 hideSubForm ()
 Sub form hidden on init?
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders)
 getHiddenTitle ()
 Get hidden title.
 getItemByPostVar ($a_post_var)
 Get item by post var.
 serializeData ()
 serialize data
 unserializeData ($a_data)
 unserialize data
 writeToSession ()
 Write to session.
 clearFromSession ()
 Clear session value.
 readFromSession ()
 Read from session.
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties)
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi.
 getMulti ()
 Get Multi.
 setMultiValues (array $a_values)
 Set multi values.
 getMultiValues ()
 Get multi values.
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g.

Protected Attributes

 $value
 $cols
 $rows
 $settings
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 $title
 $postvar
 $info
 $alert
 $required = false
 $parentgui
 $parentform
 $hidden_title = ""
 $multi = false
 $multi_sortable = false
 $multi_addremove = true
 $multi_values

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type.
 getMultiIconsHTML ()
 Get HTML for multiple value icons.

Detailed Description

This class represents a copyright 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 16 of file class.ilCopyrightInputGUI.php.

Constructor & Destructor Documentation

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

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Reimplemented from ilFormPropertyGUI.

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

References $lng, ilMDSettings\_getInstance(), and ilFormPropertyGUI\setType().

{
global $lng;
$this->lng = $lng;
$this->lng->loadLanguageModule("meta");
parent::__construct($a_title, $a_postvar);
$this->setType("copyright");
$this->settings = ilMDSettings::_getInstance();
}

+ Here is the call graph for this function:

Member Function Documentation

ilCopyrightInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Reimplemented from ilFormPropertyGUI.

Definition at line 116 of file class.ilCopyrightInputGUI.php.

References $_POST, $lng, ilFormPropertyGUI\getPostVar(), and ilUtil\stripSlashes().

{
global $lng;
if($this->usePurifier() && $this->getPurifier())
{
$_POST[$this->getPostVar()]["ta"] = ilUtil::stripSlashes($_POST[$this->getPostVar()]["ta"]);
}
// todo: implement setRequired, if needed
return true;
}

+ Here is the call graph for this function:

ilCopyrightInputGUI::getCols ( )

Get Cols.

Returns
int Cols

Definition at line 76 of file class.ilCopyrightInputGUI.php.

References $cols.

Referenced by insert().

{
return $this->cols;
}

+ Here is the caller graph for this function:

ilCopyrightInputGUI::getRows ( )

Get Rows.

Returns
int Rows

Definition at line 96 of file class.ilCopyrightInputGUI.php.

References $rows.

Referenced by insert().

{
return $this->rows;
}

+ Here is the caller graph for this function:

ilCopyrightInputGUI::getValue ( )

Get Value.

Returns
string Value

Definition at line 56 of file class.ilCopyrightInputGUI.php.

References $value.

Referenced by insert().

{
return $this->value;
}

+ Here is the caller graph for this function:

ilCopyrightInputGUI::insert ( $a_tpl)

Insert property html.

Definition at line 133 of file class.ilCopyrightInputGUI.php.

References ilMDCopyrightSelectionEntry\_extractEntryId(), ilMDCopyrightSelectionEntry\_getEntries(), getCols(), ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), ilFormPropertyGUI\getHiddenTag(), ilFormPropertyGUI\getPostVar(), getRows(), getValue(), and ilUtil\prepareFormOutput().

{
include_once('Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php');
$ttpl = new ilTemplate("tpl.prop_copyright.html", true, true, "Services/MetaData");
$use_selection = ($this->settings->isCopyrightSelectionActive() && count($entries));
$val = $this->getValue();
if ($use_selection)
{
include_once('Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php');
$found = false;
foreach($entries as $entry)
{
$ttpl->setCurrentBlock('copyright_selection');
if($entry->getEntryId() == $default_id)
{
$found = true;
$ttpl->setVariable('COPYRIGHT_CHECKED','checked="checked"');
}
$ttpl->setVariable('COPYRIGHT_ID',$entry->getEntryId());
$ttpl->setVariable('COPYRIGHT_TITLE',$entry->getTitle());
$ttpl->setVariable('COPYRIGHT_DESCRIPTION',$entry->getDescription());
$ttpl->setVariable('SPOST_VAR', $this->getPostVar());
$ttpl->parseCurrentBlock();
}
$ttpl->setCurrentBlock('copyright_selection');
if(!$found)
{
$ttpl->setVariable('COPYRIGHT_CHECKED','checked="checked"');
}
$ttpl->setVariable('COPYRIGHT_ID',0);
$ttpl->setVariable('COPYRIGHT_TITLE',$this->lng->txt('meta_cp_own'));
$ttpl->setVariable('SPOST_VAR', $this->getPostVar());
$ttpl->parseCurrentBlock();
}
if ($this->getCols() > 5)
{
$ttpl->setCurrentBlock("prop_ta_c");
$ttpl->setVariable("COLS", $this->getCols());
$ttpl->parseCurrentBlock();
}
else
{
$ttpl->touchBlock("prop_ta_w");
}
$ttpl->setCurrentBlock("prop_copyright");
$ttpl->setVariable("ROWS", $this->getRows());
if (!$this->getDisabled())
{
$ttpl->setVariable("POST_VAR",
$this->getPostVar());
}
$ttpl->setVariable("ID", $this->getFieldId());
if ($this->getDisabled())
{
$ttpl->setVariable('DISABLED','disabled="disabled" ');
}
if ($this->getDisabled())
{
$ttpl->setVariable("HIDDEN_INPUT",
$this->getHiddenTag($this->getPostVar(), $this->getValue()));
}
if (!$use_selection || !$found)
{
$ttpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($val["ta"]));
}
$ttpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("prop_generic");
$a_tpl->setVariable("PROP_GENERIC", $ttpl->get());
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilCopyrightInputGUI::setCols (   $a_cols)

Set Cols.

Parameters
int$a_colsCols

Definition at line 66 of file class.ilCopyrightInputGUI.php.

Referenced by ilMDEditorGUI\initQuickEditForm().

{
$this->cols = $a_cols;
}

+ Here is the caller graph for this function:

ilCopyrightInputGUI::setRows (   $a_rows)

Set Rows.

Parameters
int$a_rowsRows

Definition at line 86 of file class.ilCopyrightInputGUI.php.

{
$this->rows = $a_rows;
}
ilCopyrightInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

Definition at line 46 of file class.ilCopyrightInputGUI.php.

Referenced by setValueByArray().

{
$this->value = $a_value;
}

+ Here is the caller graph for this function:

ilCopyrightInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

Definition at line 106 of file class.ilCopyrightInputGUI.php.

References ilFormPropertyGUI\getPostVar(), and setValue().

{
$this->setValue($a_values[$this->getPostVar()]);
}

+ Here is the call graph for this function:

Field Documentation

ilCopyrightInputGUI::$cols
protected

Definition at line 19 of file class.ilCopyrightInputGUI.php.

Referenced by getCols().

ilCopyrightInputGUI::$rows
protected

Definition at line 20 of file class.ilCopyrightInputGUI.php.

Referenced by getRows().

ilCopyrightInputGUI::$settings
protected

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

ilCopyrightInputGUI::$value
protected

Definition at line 18 of file class.ilCopyrightInputGUI.php.

Referenced by getValue().


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