ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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().

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

Member Function Documentation

◆ addField()

arViewFields::addField ( arViewField  $field)
Parameters
arViewField

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

References fields, and arField\getName().

Referenced by __construct().

80  {
81  $this->fields[$field->getName()] = $field;
82  }
$errors fields
Definition: imgupload.php:52
+ 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 135 of file class.arViewFields.php.

References fields.

Referenced by getPrimaryField().

135  {
136  return $this->fields[$field_name];
137  }
$errors fields
Definition: imgupload.php:52
+ Here is the caller graph for this function:

◆ getFields()

arViewFields::getFields ( )
Returns
arViewField[]

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

References $fields.

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

88  {
89  return $this->fields;
90  }
+ Here is the caller graph for this function:

◆ getPrimaryField()

arViewFields::getPrimaryField ( )
Returns
arViewField

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

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

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

◆ getTxtPrefix()

arViewFields::getTxtPrefix ( )
Returns
string

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

References $txt_prefix.

154  {
155  return $this->txt_prefix;
156  }

◆ setCreatedByField()

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

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

References $created_by_field, and getFields().

162  {
163  $created_by_field->setIsCreatedByField(true);
164  $this->created_by_field = $created_by_field;
165  }
+ Here is the call graph for this function:

◆ setCreationDateField()

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

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

References $creation_date_field, and getFields().

190  {
191  $creation_date_field->setIsCreationDateField(true);
192  $this->creation_date_field = $creation_date_field;
193  }
+ Here is the call graph for this function:

◆ setModificationDateField()

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

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

References $modification_date_field, and getFields().

218  {
219  $modification_date_field->setIsModificationDateField(true);
220  $this->modification_date_field = $modification_date_field;
221  }
+ Here is the call graph for this function:

◆ setModifiedByField()

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

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

References $modified_by_field, and getFields().

246  {
247  $modified_by_field->setIsModifiedByField(true);
248  $this->modified_by_field = $modified_by_field;
249  }
+ Here is the call graph for this function:

◆ setTxtPrefix()

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

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

References $txt_prefix, and getFields().

143  {
144  $this->txt_prefix = $txt_prefix;
145  foreach ($this->getFields() as $field) {
146  $field->setTxtPrefix($txt_prefix);
147  }
148  }
+ Here is the call graph for this function:

◆ sortFields()

arViewFields::sortFields ( )
Returns
bool

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

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

104  {
105  uasort($this->fields, function (arViewField $field_a, arViewField $field_b) {
106  return $field_a->getPosition() > $field_b->getPosition();
107  });
108  }
$errors fields
Definition: imgupload.php:52
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: