ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
arViewFields Class Reference

GUI-Class arViewFields. More...

+ Inheritance diagram for arViewFields:
+ Collaboration diagram for arViewFields:

Public Member Functions

 __construct (ActiveRecord $ar)
 
 addField (arViewField $field)
 
 getFields ()
 
 getPrimaryField ()
 
 sortFields ()
 
 getField ($field_name)
 
 setTxtPrefix ($txt_prefix)
 
 getTxtPrefix ()
 
 setCreatedByField ($created_by_field)
 
 setCreationDateField ($creation_date_field)
 
 setModificationDateField ($modification_date_field)
 
 setModifiedByField ($modified_by_field)
 

Data Fields

const FIELD_CLASS = 'arViewField'
 

Protected Attributes

 $fields = array()
 
 $fields_for_display = null
 
 $active_record = null
 
 $txt_prefix = ""
 
 $created_by_field = null
 
 $modified_by_field = null
 
 $creation_date_field = null
 
 $modification_date_field = null
 

Detailed Description

GUI-Class arViewFields.

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 12 of file class.arViewFields.php.

Constructor & Destructor Documentation

◆ __construct()

arViewFields::__construct ( ActiveRecord  $ar)
Parameters
ActiveRecord$ar

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

References $fields, and addField().

53  {
54  $this->active_record = $ar;
55  $this->generateFields();
56  }
+ Here is the call graph for this function:

Member Function Documentation

◆ addField()

arViewFields::addField ( arViewField  $field)
Parameters
arViewField

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

References fields, and arField\getName().

Referenced by __construct().

83  {
84  $this->fields[$field->getName()] = $field;
85  }
$errors fields
Definition: imgupload.php:51
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getField()

arViewFields::getField (   $field_name)
Parameters
$field_name
Returns
arViewField

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

References fields.

Referenced by getPrimaryField().

143  {
144  return $this->fields[$field_name];
145  }
$errors fields
Definition: imgupload.php:51
+ Here is the caller graph for this function:

◆ getFields()

arViewFields::getFields ( )
Returns
arViewField[]

Definition at line 91 of file class.arViewFields.php.

References $fields.

Referenced by setCreatedByField(), setCreationDateField(), setModificationDateField(), setModifiedByField(), setTxtPrefix(), and sortFields().

92  {
93  return $this->fields;
94  }
+ Here is the caller graph for this function:

◆ getPrimaryField()

arViewFields::getPrimaryField ( )
Returns
arViewField

Definition at line 100 of file class.arViewFields.php.

References getField(), and arFieldCache\getPrimaryFieldName().

101  {
102  return $this->getField(arFieldCache::getPrimaryFieldName($this->active_record));
103  }
static getPrimaryFieldName(ActiveRecord $ar)
getField($field_name)
+ Here is the call graph for this function:

◆ getTxtPrefix()

arViewFields::getTxtPrefix ( )
Returns
string

Definition at line 163 of file class.arViewFields.php.

References $txt_prefix.

164  {
165  return $this->txt_prefix;
166  }

◆ setCreatedByField()

arViewFields::setCreatedByField (   $created_by_field)
Parameters
\arViewField$created_by_field

Definition at line 172 of file class.arViewFields.php.

References $created_by_field, and getFields().

173  {
174  $created_by_field->setIsCreatedByField(true);
175  $this->created_by_field = $created_by_field;
176  }
+ Here is the call graph for this function:

◆ setCreationDateField()

arViewFields::setCreationDateField (   $creation_date_field)
Parameters
\arViewField$creation_date_field

Definition at line 202 of file class.arViewFields.php.

References $creation_date_field, and getFields().

203  {
204  $creation_date_field->setIsCreationDateField(true);
205  $this->creation_date_field = $creation_date_field;
206  }
+ Here is the call graph for this function:

◆ setModificationDateField()

arViewFields::setModificationDateField (   $modification_date_field)
Parameters
\arViewField$modification_date_field

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

References $modification_date_field, and getFields().

233  {
234  $modification_date_field->setIsModificationDateField(true);
235  $this->modification_date_field = $modification_date_field;
236  }
+ Here is the call graph for this function:

◆ setModifiedByField()

arViewFields::setModifiedByField (   $modified_by_field)
Parameters
\arViewField$modified_by_field

Definition at line 262 of file class.arViewFields.php.

References $modified_by_field, and getFields().

263  {
264  $modified_by_field->setIsModifiedByField(true);
265  $this->modified_by_field = $modified_by_field;
266  }
+ Here is the call graph for this function:

◆ setTxtPrefix()

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

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

References $txt_prefix, and getFields().

152  {
153  $this->txt_prefix = $txt_prefix;
154  foreach ($this->getFields() as $field) {
155  $field->setTxtPrefix($txt_prefix);
156  }
157  }
+ Here is the call graph for this function:

◆ sortFields()

arViewFields::sortFields ( )
Returns
bool

Definition at line 109 of file class.arViewFields.php.

References $fields_for_display, fields, getFields(), and arViewField\getPosition().

110  {
111  uasort($this->fields, function (arViewField $field_a, arViewField $field_b) {
112  return $field_a->getPosition() > $field_b->getPosition();
113  });
114  }
$errors fields
Definition: imgupload.php:51
GUI-Class arViewField.
+ Here is the call graph for this function:

Field Documentation

◆ $active_record

arViewFields::$active_record = null
protected

Definition at line 26 of file class.arViewFields.php.

◆ $created_by_field

arViewFields::$created_by_field = null
protected

Definition at line 34 of file class.arViewFields.php.

Referenced by setCreatedByField().

◆ $creation_date_field

arViewFields::$creation_date_field = null
protected

Definition at line 42 of file class.arViewFields.php.

Referenced by setCreationDateField().

◆ $fields

arViewFields::$fields = array()
protected

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

Referenced by __construct(), and getFields().

◆ $fields_for_display

arViewFields::$fields_for_display = null
protected

Definition at line 22 of file class.arViewFields.php.

Referenced by sortFields().

◆ $modification_date_field

arViewFields::$modification_date_field = null
protected

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

Referenced by setModificationDateField().

◆ $modified_by_field

arViewFields::$modified_by_field = null
protected

Definition at line 38 of file class.arViewFields.php.

Referenced by setModifiedByField().

◆ $txt_prefix

arViewFields::$txt_prefix = ""
protected

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

Referenced by getTxtPrefix(), and setTxtPrefix().

◆ FIELD_CLASS

const arViewFields::FIELD_CLASS = 'arViewField'

Definition at line 14 of file class.arViewFields.php.


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