ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilWebLinkDraftParameter Class Reference

Draft class for creating and updating a parameter attached to Web Link items. More...

+ Inheritance diagram for ilWebLinkDraftParameter:
+ Collaboration diagram for ilWebLinkDraftParameter:

Public Member Functions

 replaces (?ilWebLinkParameter $old_parameter)
 
 getOldParameter ()
 
 validate ()
 TODO: Modernizing the forms to input parameters will make this additional layer of input validation obsolete. More...
 
- Public Member Functions inherited from ilWebLinkBaseParameter
 __construct (int $value, string $name)
 
 getValue ()
 
 getName ()
 

Data Fields

const string LINKS_ERR_NO_NAME = 'links_no_name_given'
 TODO: This can be removed when validate is. More...
 
const string LINKS_ERR_NO_VALUE = 'links_no_value_given'
 
const string LINKS_ERR_NO_NAME_VALUE = 'links_no_name_no_value'
 
- Data Fields inherited from ilWebLinkBaseParameter
const string UNDEFINED_NAME = 'undefined'
 
const string USER_ID_NAME = 'user_id'
 
const string LOGIN_NAME = 'login'
 
const string MATRICULATION_NAME = 'matriculation'
 
const array VALUES
 TODO Once the GUI is updated, undefined can be dropped. More...
 
const array VALUES_TEXT
 Keys of the language variables to the possible values, e.g. More...
 

Protected Attributes

ilWebLinkParameter $old_parameter = null
 
- Protected Attributes inherited from ilWebLinkBaseParameter
int $value
 
string $name
 

Detailed Description

Draft class for creating and updating a parameter attached to Web Link items.

Author
Tim Schmitz schmi.nosp@m.tz@l.nosp@m.eifos.nosp@m..de

Definition at line 25 of file class.ilWebLinkDraftParameter.php.

Member Function Documentation

◆ getOldParameter()

ilWebLinkDraftParameter::getOldParameter ( )

Definition at line 43 of file class.ilWebLinkDraftParameter.php.

References $old_parameter.

44  {
45  return $this->old_parameter;
46  }
Immutable class for parameters attached to Web Link items.

◆ replaces()

ilWebLinkDraftParameter::replaces ( ?ilWebLinkParameter  $old_parameter)

Definition at line 37 of file class.ilWebLinkDraftParameter.php.

References $old_parameter.

38  {
39  $this->old_parameter = $old_parameter;
40  return $this;
41  }
Draft class for creating and updating a parameter attached to Web Link items.

◆ validate()

ilWebLinkDraftParameter::validate ( )

TODO: Modernizing the forms to input parameters will make this additional layer of input validation obsolete.

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

References ilWebLinkBaseParameter\getName(), and ilWebLinkBaseParameter\getValue().

52  : string
53  {
54  if (!strlen($this->getName()) && !$this->getValue()) {
55  return self::LINKS_ERR_NO_NAME_VALUE;
56  }
57  if (!strlen($this->getName())) {
58  return self::LINKS_ERR_NO_NAME;
59  }
60  if (!$this->getValue()) {
61  return self::LINKS_ERR_NO_VALUE;
62  }
63  return '';
64  }
+ Here is the call graph for this function:

Field Documentation

◆ $old_parameter

ilWebLinkParameter ilWebLinkDraftParameter::$old_parameter = null
protected

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

Referenced by getOldParameter(), and replaces().

◆ LINKS_ERR_NO_NAME

const string ilWebLinkDraftParameter::LINKS_ERR_NO_NAME = 'links_no_name_given'

TODO: This can be removed when validate is.

Definition at line 30 of file class.ilWebLinkDraftParameter.php.

Referenced by ilObjLinkResourceGUI\checkLinkInput().

◆ LINKS_ERR_NO_NAME_VALUE

const string ilWebLinkDraftParameter::LINKS_ERR_NO_NAME_VALUE = 'links_no_name_no_value'

Definition at line 32 of file class.ilWebLinkDraftParameter.php.

◆ LINKS_ERR_NO_VALUE

const string ilWebLinkDraftParameter::LINKS_ERR_NO_VALUE = 'links_no_value_given'

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