ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
arViewField Class Reference

GUI-Class arViewField. More...

+ Inheritance diagram for arViewField:
+ Collaboration diagram for arViewField:

Public Member Functions

 __construct ($name, $txt=NULL, $position=0, $visible=true, $custom_field=false)
 
 setPosition ($position)
 
 getPosition ()
 
 setTxt ($txt)
 
 getTxt ()
 
 setVisible ($visible)
 
 getVisible ()
 
 setCustomField ($custom_field)
 
 getCustomField ()
 
 setTxtPrefix ($txt_prefix)
 
 getTxtPrefix ()
 
 getGetFunctionName ()
 
 getSetFunctionName ()
 
 setIsCreatedByField ($is_created_by_field)
 
 setIsCreationDateField ($is_creation_date_field)
 
 getIsCreationDateField ()
 
 getIsCreatedByField ()
 
 setIsModifiedByField ($is_modified_by_field)
 
 getIsModifiedByField ()
 
 setIsModificationDateField ($is_modification_date_field)
 
 getIsModificationDateField ()
 
- Public Member Functions inherited from arField
 loadFromArray ($name, array $array)
 
 loadFromStdClass ($name, stdClass $stdClass)
 
 getAttributesForConnector ()
 
 getAttributesForDescription ()
 
 isDateField ()
 
 setFieldType ($field_type)
 
 getFieldType ()
 
 setHasField ($has_field)
 
 getHasField ()
 
 setLength ($length)
 
 getLength ()
 
 setName ($name)
 
 getName ()
 
 setNotNull ($not_null)
 
 getNotNull ()
 
 setPrimary ($primary)
 
 getPrimary ()
 
 setUnique ($unique)
 
 getUnique ()
 
 setSequence ($sequence)
 
 getSequence ()
 
 setIndex ($index)
 
 getIndex ()
 

Static Public Member Functions

static setAllowedAttributes ($allowed_attributes)
 
static getAllowedAttributes ()
 
static castFromFieldToViewField (arField $field)
 
- Static Public Member Functions inherited from arField
static isAllowedAttribute ($type, $field_name)
 
static isDateFieldType ($field_type)
 

Protected Attributes

 $txt_prefix = ""
 
 $txt = ""
 
 $position = 1000
 
 $visible = false
 
 $custom_field = false
 
 $get_function_name = ""
 
 $set_function_name = ""
 
 $is_created_by_field = false
 
 $is_modified_by_field = false
 
 $is_creation_date_field = false
 
 $is_modification_date_field = false
 
- Protected Attributes inherited from arField
 $fieldtype
 
 $length = NULL
 
 $is_primary = false
 
 $name = ''
 
 $not_null = false
 
 $unique = false
 
 $has_field = false
 
 $sequence = false
 
 $index = false
 

Additional Inherited Members

- Data Fields inherited from arField
const FIELD_TYPE_TEXT = 'text'
 
const FIELD_TYPE_INTEGER = 'integer'
 
const FIELD_TYPE_FLOAT = 'float'
 
const FIELD_TYPE_DATE = 'date'
 
const FIELD_TYPE_TIME = 'time'
 
const FIELD_TYPE_TIMESTAMP = 'timestamp'
 
const FIELD_TYPE_CLOB = 'clob'
 
- Static Protected Attributes inherited from arField
static $allowed_attributes
 
static $date_fields
 

Detailed Description

GUI-Class arViewField.

Author
Timon Amstutz timon.nosp@m..ams.nosp@m.tutz@.nosp@m.ilub.nosp@m..unib.nosp@m.e.ch
Version
2.0.7

Definition at line 11 of file class.arViewField.php.

Constructor & Destructor Documentation

◆ __construct()

arViewField::__construct (   $name,
  $txt = NULL,
  $position = 0,
  $visible = true,
  $custom_field = false 
)
Parameters
$name
null$txt
int$position
bool$visible
bool$custom_field

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

References $custom_field, arField\$name, $position, $txt, $visible, ActiveRecord\_toCamelCase(), and arField\getName().

66  {
67  $this->name = $name;
68  $this->position = $position;
69  $this->txt = $txt;
70  $this->visible = $visible;
71  $this->custom_field = $custom_field;
72 
73  $camel_case = ActiveRecord::_toCamelCase($this->getName(), true);
74  $this->get_function_name = "get" . $camel_case;
75  $this->set_function_name = "set" . $camel_case;
76  }
static _toCamelCase($str, $capitalise_first_char=false)
+ Here is the call graph for this function:

Member Function Documentation

◆ castFromFieldToViewField()

static arViewField::castFromFieldToViewField ( arField  $field)
static
Parameters
arField$field
Returns
arViewField

Definition at line 264 of file class.arViewField.php.

References arField\$name, and arField\getName().

264  {
265  require_once('./Services/ActiveRecord/Views/Index/class.arIndexTableField.php');
266  require_once('./Services/ActiveRecord/Views/Edit/class.arEditField.php');
267  require_once('./Services/ActiveRecord/Views/Display/class.arDisplayField.php');
268 
269  $field_class = get_called_class();
270  $obj = new $field_class($field->getName());
271  foreach (get_object_vars($field) as $key => $name) {
272  $obj->$key = $name;
273  }
274 
275  return $obj;
276  }
+ Here is the call graph for this function:

◆ getAllowedAttributes()

static arViewField::getAllowedAttributes ( )
static
Returns
array

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

158  {
159  return self::$allowed_attributes;
160  }

◆ getCustomField()

arViewField::getCustomField ( )
Returns
boolean

Definition at line 142 of file class.arViewField.php.

References $custom_field.

Referenced by arDisplayGUI\setArFieldData().

142  {
143  return $this->custom_field;
144  }
+ Here is the caller graph for this function:

◆ getGetFunctionName()

arViewField::getGetFunctionName ( )
Returns
string

Definition at line 182 of file class.arViewField.php.

References $get_function_name.

Referenced by arEditGUI\afterFillForm().

182  {
184  }
+ Here is the caller graph for this function:

◆ getIsCreatedByField()

arViewField::getIsCreatedByField ( )
Returns
boolean

Definition at line 222 of file class.arViewField.php.

References $is_created_by_field.

Referenced by arDisplayGUI\setArFieldData().

222  {
224  }
+ Here is the caller graph for this function:

◆ getIsCreationDateField()

arViewField::getIsCreationDateField ( )
Returns
boolean

Definition at line 214 of file class.arViewField.php.

References $is_creation_date_field.

214  {
216  }

◆ getIsModificationDateField()

arViewField::getIsModificationDateField ( )
Returns
boolean

Definition at line 254 of file class.arViewField.php.

References $is_modification_date_field.

254  {
256  }

◆ getIsModifiedByField()

arViewField::getIsModifiedByField ( )
Returns
boolean

Definition at line 238 of file class.arViewField.php.

References $is_modified_by_field.

Referenced by arDisplayGUI\setArFieldData().

238  {
240  }
+ Here is the caller graph for this function:

◆ getPosition()

arViewField::getPosition ( )
Returns
string

Definition at line 90 of file class.arViewField.php.

References $position.

Referenced by arEditFields\sortFields(), and arViewFields\sortFields().

90  {
91  return $this->position;
92  }
+ Here is the caller graph for this function:

◆ getSetFunctionName()

arViewField::getSetFunctionName ( )
Returns
string

Definition at line 190 of file class.arViewField.php.

References $set_function_name.

Referenced by arEditGUI\setDateTimeRecordField(), arEditGUI\setNumericRecordField(), and arEditGUI\setTextRecordField().

190  {
192  }
+ Here is the caller graph for this function:

◆ getTxt()

arViewField::getTxt ( )
Returns
string

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

References $txt, arField\getName(), and getTxtPrefix().

Referenced by arEditGUI\addBooleanInputField(), arEditGUI\addClobInputField(), arEditGUI\addDateTimeInputField(), arIndexTableGUI\addFilterField(), arEditGUI\addNumbericInputField(), and arEditGUI\addTextInputField().

106  {
107  if ($this->txt) {
108  return $this->getTxtPrefix() . $this->txt;
109  }
110 
111  return $this->getTxtPrefix() . $this->getName();
112  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTxtPrefix()

arViewField::getTxtPrefix ( )
Returns
string

Definition at line 174 of file class.arViewField.php.

References $txt_prefix.

Referenced by getTxt().

174  {
175  return $this->txt_prefix;
176  }
+ Here is the caller graph for this function:

◆ getVisible()

arViewField::getVisible ( )
Returns
string

Definition at line 126 of file class.arViewField.php.

References $visible.

Referenced by arIndexTableGUI\checkColumnVisibile().

126  {
127  return $this->visible;
128  }
+ Here is the caller graph for this function:

◆ setAllowedAttributes()

static arViewField::setAllowedAttributes (   $allowed_attributes)
static
Parameters
array$allowed_attributes

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

References arField\$allowed_attributes.

150  {
151  self::$allowed_attributes = $allowed_attributes;
152  }
static $allowed_attributes

◆ setCustomField()

arViewField::setCustomField (   $custom_field)
Parameters
boolean$custom_field

Definition at line 134 of file class.arViewField.php.

References $custom_field.

134  {
135  $this->custom_field = $custom_field;
136  }

◆ setIsCreatedByField()

arViewField::setIsCreatedByField (   $is_created_by_field)
Parameters
boolean$is_created_by_field

Definition at line 198 of file class.arViewField.php.

References $is_created_by_field.

198  {
199  $this->is_created_by_field = $is_created_by_field;
200  }

◆ setIsCreationDateField()

arViewField::setIsCreationDateField (   $is_creation_date_field)
Parameters
$is_creation_date_field

Definition at line 206 of file class.arViewField.php.

References $is_creation_date_field.

206  {
207  $this->is_creation_date_field = $is_creation_date_field;
208  }

◆ setIsModificationDateField()

arViewField::setIsModificationDateField (   $is_modification_date_field)
Parameters
$is_modification_date_field

Definition at line 246 of file class.arViewField.php.

References $is_modification_date_field.

246  {
247  $this->is_modification_date_field = $is_modification_date_field;
248  }

◆ setIsModifiedByField()

arViewField::setIsModifiedByField (   $is_modified_by_field)
Parameters
boolean$is_modified_by_field

Definition at line 230 of file class.arViewField.php.

References $is_modified_by_field.

230  {
231  $this->is_modified_by_field = $is_modified_by_field;
232  }

◆ setPosition()

arViewField::setPosition (   $position)
Parameters
string$position

Definition at line 82 of file class.arViewField.php.

References $position.

82  {
83  $this->position = $position;
84  }

◆ setTxt()

arViewField::setTxt (   $txt)
Parameters
string$txt

Definition at line 98 of file class.arViewField.php.

References $txt.

98  {
99  $this->txt = $txt;
100  }

◆ setTxtPrefix()

arViewField::setTxtPrefix (   $txt_prefix)
Parameters
string$txt_prefix

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

References $txt_prefix.

166  {
167  $this->txt_prefix = $txt_prefix;
168  }

◆ setVisible()

arViewField::setVisible (   $visible)
Parameters
string$visible

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

References $visible.

Referenced by arEditField\setIsCreatedByField(), arEditField\setIsCreationDateField(), arEditField\setIsModificationDateField(), arEditField\setIsModifiedByField(), and arIndexTableField\setVisibleDefault().

118  {
119  $this->visible = $visible;
120  }
+ Here is the caller graph for this function:

Field Documentation

◆ $custom_field

arViewField::$custom_field = false
protected

◆ $get_function_name

arViewField::$get_function_name = ""
protected

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

Referenced by getGetFunctionName().

◆ $is_created_by_field

arViewField::$is_created_by_field = false
protected

◆ $is_creation_date_field

arViewField::$is_creation_date_field = false
protected

◆ $is_modification_date_field

arViewField::$is_modification_date_field = false
protected

◆ $is_modified_by_field

arViewField::$is_modified_by_field = false
protected

◆ $position

arViewField::$position = 1000
protected

◆ $set_function_name

arViewField::$set_function_name = ""
protected

Definition at line 40 of file class.arViewField.php.

Referenced by getSetFunctionName().

◆ $txt

arViewField::$txt = ""
protected

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

Referenced by arIndexTableField\__construct(), __construct(), getTxt(), and setTxt().

◆ $txt_prefix

arViewField::$txt_prefix = ""
protected

Definition at line 16 of file class.arViewField.php.

Referenced by getTxtPrefix(), and setTxtPrefix().

◆ $visible

arViewField::$visible = false
protected

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