ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 67 of file class.arViewField.php.

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

68  {
69  $this->name = $name;
70  $this->position = $position;
71  $this->txt = $txt;
72  $this->visible = $visible;
73  $this->custom_field = $custom_field;
74 
75  $camel_case = ActiveRecord::_toCamelCase($this->getName(), true);
76  $this->get_function_name = "get" . $camel_case;
77  $this->set_function_name = "set" . $camel_case;
78  }
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 288 of file class.arViewField.php.

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

289  {
290  require_once('./Services/ActiveRecord/Views/Index/class.arIndexTableField.php');
291  require_once('./Services/ActiveRecord/Views/Edit/class.arEditField.php');
292  require_once('./Services/ActiveRecord/Views/Display/class.arDisplayField.php');
293 
294  $field_class = get_called_class();
295  $obj = new $field_class($field->getName());
296  foreach (get_object_vars($field) as $key => $name) {
297  $obj->$key = $name;
298  }
299 
300  return $obj;
301  }
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ getAllowedAttributes()

static arViewField::getAllowedAttributes ( )
static
Returns
array

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

170  {
171  return self::$allowed_attributes;
172  }

◆ getCustomField()

arViewField::getCustomField ( )
Returns
boolean

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

References $custom_field.

Referenced by arDisplayGUI\setArFieldData().

152  {
153  return $this->custom_field;
154  }
+ Here is the caller graph for this function:

◆ getGetFunctionName()

arViewField::getGetFunctionName ( )
Returns
string

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

References $get_function_name.

Referenced by arEditGUI\afterFillForm().

197  {
199  }
+ Here is the caller graph for this function:

◆ getIsCreatedByField()

arViewField::getIsCreatedByField ( )
Returns
boolean

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

References $is_created_by_field.

Referenced by arDisplayGUI\setArFieldData().

242  {
244  }
+ Here is the caller graph for this function:

◆ getIsCreationDateField()

arViewField::getIsCreationDateField ( )
Returns
boolean

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

References $is_creation_date_field.

233  {
235  }

◆ getIsModificationDateField()

arViewField::getIsModificationDateField ( )
Returns
boolean

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

References $is_modification_date_field.

278  {
280  }

◆ getIsModifiedByField()

arViewField::getIsModifiedByField ( )
Returns
boolean

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

References $is_modified_by_field.

Referenced by arDisplayGUI\setArFieldData().

260  {
262  }
+ Here is the caller graph for this function:

◆ getPosition()

arViewField::getPosition ( )
Returns
string

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

References $position.

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

94  {
95  return $this->position;
96  }
+ Here is the caller graph for this function:

◆ getSetFunctionName()

arViewField::getSetFunctionName ( )
Returns
string

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

References $set_function_name.

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

206  {
208  }
+ Here is the caller graph for this function:

◆ getTxt()

arViewField::getTxt ( )
Returns
string

Definition at line 111 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().

112  {
113  if ($this->txt) {
114  return $this->getTxtPrefix() . $this->txt;
115  }
116 
117  return $this->getTxtPrefix() . $this->getName();
118  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTxtPrefix()

arViewField::getTxtPrefix ( )
Returns
string

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

References $txt_prefix.

Referenced by getTxt().

188  {
189  return $this->txt_prefix;
190  }
+ Here is the caller graph for this function:

◆ getVisible()

arViewField::getVisible ( )
Returns
string

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

References $visible.

Referenced by arIndexTableGUI\checkColumnVisibile().

134  {
135  return $this->visible;
136  }
+ Here is the caller graph for this function:

◆ setAllowedAttributes()

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

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

References arField\$allowed_attributes.

161  {
162  self::$allowed_attributes = $allowed_attributes;
163  }
static $allowed_attributes

◆ setCustomField()

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

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

References $custom_field.

143  {
144  $this->custom_field = $custom_field;
145  }

◆ setIsCreatedByField()

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

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

References $is_created_by_field.

215  {
216  $this->is_created_by_field = $is_created_by_field;
217  }

◆ setIsCreationDateField()

arViewField::setIsCreationDateField (   $is_creation_date_field)
Parameters
$is_creation_date_field

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

References $is_creation_date_field.

224  {
225  $this->is_creation_date_field = $is_creation_date_field;
226  }

◆ setIsModificationDateField()

arViewField::setIsModificationDateField (   $is_modification_date_field)
Parameters
$is_modification_date_field

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

References $is_modification_date_field.

269  {
270  $this->is_modification_date_field = $is_modification_date_field;
271  }

◆ setIsModifiedByField()

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

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

References $is_modified_by_field.

251  {
252  $this->is_modified_by_field = $is_modified_by_field;
253  }

◆ setPosition()

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

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

References $position.

85  {
86  $this->position = $position;
87  }

◆ setTxt()

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

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

References $txt.

103  {
104  $this->txt = $txt;
105  }

◆ setTxtPrefix()

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

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

References $txt_prefix.

179  {
180  $this->txt_prefix = $txt_prefix;
181  }

◆ setVisible()

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

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

References $visible.

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

125  {
126  $this->visible = $visible;
127  }
+ 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 37 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 41 of file class.arViewField.php.

Referenced by getSetFunctionName().

◆ $txt

arViewField::$txt = ""
protected

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

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

◆ $txt_prefix

arViewField::$txt_prefix = ""
protected

Definition at line 17 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: