ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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.

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)

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

+ 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.

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 }

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

+ 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 {
160 }
static $allowed_attributes

References arField\$allowed_attributes.

◆ getCustomField()

arViewField::getCustomField ( )
Returns
boolean

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

142 {
143 return $this->custom_field;
144 }

References $custom_field.

Referenced by arDisplayGUI\setArFieldData().

+ Here is the caller graph for this function:

◆ getGetFunctionName()

arViewField::getGetFunctionName ( )
Returns
string

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

182 {
184 }

References $get_function_name.

◆ getIsCreatedByField()

arViewField::getIsCreatedByField ( )
Returns
boolean

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

222 {
224 }

References $is_created_by_field.

Referenced by arDisplayGUI\setArFieldData().

+ Here is the caller graph for this function:

◆ getIsCreationDateField()

arViewField::getIsCreationDateField ( )
Returns
boolean

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

214 {
216 }

References $is_creation_date_field.

◆ getIsModificationDateField()

arViewField::getIsModificationDateField ( )
Returns
boolean

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

254 {
256 }

References $is_modification_date_field.

◆ getIsModifiedByField()

arViewField::getIsModifiedByField ( )
Returns
boolean

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

238 {
240 }

References $is_modified_by_field.

Referenced by arDisplayGUI\setArFieldData().

+ Here is the caller graph for this function:

◆ getPosition()

arViewField::getPosition ( )
Returns
string

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

90 {
91 return $this->position;
92 }

References $position.

Referenced by arViewFields\sortFields().

+ Here is the caller graph for this function:

◆ getSetFunctionName()

arViewField::getSetFunctionName ( )
Returns
string

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

190 {
192 }

References $set_function_name.

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

+ Here is the caller graph for this function:

◆ getTxt()

arViewField::getTxt ( )
Returns
string

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

106 {
107 if ($this->txt) {
108 return $this->getTxtPrefix() . $this->txt;
109 }
110
111 return $this->getTxtPrefix() . $this->getName();
112 }

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

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

+ 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.

174 {
175 return $this->txt_prefix;
176 }

References $txt_prefix.

Referenced by getTxt().

+ Here is the caller graph for this function:

◆ getVisible()

arViewField::getVisible ( )
Returns
string

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

126 {
127 return $this->visible;
128 }

References $visible.

Referenced by arIndexTableGUI\checkColumnVisibile().

+ 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.

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

References arField\$allowed_attributes.

◆ setCustomField()

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

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

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

References $custom_field.

◆ setIsCreatedByField()

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

Reimplemented in arEditField.

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

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

References $is_created_by_field.

◆ setIsCreationDateField()

arViewField::setIsCreationDateField (   $is_creation_date_field)
Parameters
$is_creation_date_field

Reimplemented in arEditField.

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

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

References $is_creation_date_field.

◆ setIsModificationDateField()

arViewField::setIsModificationDateField (   $is_modification_date_field)
Parameters
$is_modification_date_field

Reimplemented in arEditField.

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

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

References $is_modification_date_field.

◆ setIsModifiedByField()

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

Reimplemented in arEditField.

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

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

References $is_modified_by_field.

◆ setPosition()

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

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

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

References $position.

◆ setTxt()

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

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

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

References $txt.

◆ setTxtPrefix()

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

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

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

References $txt_prefix.

◆ setVisible()

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

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

118 {
119 $this->visible = $visible;
120 }

References $visible.

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

+ 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 __construct(), arIndexTableField\__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: