79 return "il_dcl_tableview";
151 $this->tableview_order = $order;
216 if ($field_name ==
'roles') {
217 return json_encode($this->roles);
230 public function wakeUp($field_name, $field_value)
232 if ($field_name ==
'roles') {
233 return json_decode($field_value);
243 public function delete()
272 "tableview_id" => $this->
id,
274 'il_dcl_tfield_set.table_id' => $this->
getTableId(),
276 )->innerjoin(
'il_dcl_tfield_set',
'field',
'field', array())
277 ->orderBy(
'il_dcl_tfield_set.field_order')
289 if (!$this->visible_fields_cache) {
293 "tableview_id" => $this->
id,
295 'il_dcl_tfield_set.table_id' => $this->
getTableId(),
297 )->innerjoin(
'il_dcl_tfield_set',
'field',
'field', array())->orderBy(
'il_dcl_tfield_set.field_order')->get();
299 foreach ($visible as $field_rec) {
300 $fields[] = $field_rec->getFieldObject();
302 $this->visible_fields_cache = $fields;
313 'tableview_id' => $this->
getId(),
314 'il_dcl_tfield_set.table_id' => $this->
getTableId(),
316 )->innerjoin(
'il_dcl_tfield_set',
'field',
'field', array(
'field_order'))->orderBy(
'field_order')->get();
323 public function create($create_default_settings =
true)
326 if ($create_default_settings) {
339 foreach (
$table->getFieldIds() as $field_id) {
345 if (!
$table->getPublicCommentsEnabled()) {
360 'tableview_id' => $this->
id,
361 'field' => $field_id,
366 $field_set->setTableviewId($this->
id);
367 $field_set->setField($field_id);
369 $field_set->setFilterChangeable(
true);
370 $field_set->create();
391 $new_fieldsetting->setTableviewId($this->
getId());
392 if ($new_fields[$orig_fieldsetting->getField()]) {
394 $new_fieldsetting->setField($new_fields[$orig_fieldsetting->getField()]->getId());
397 $new_fieldsetting->setField($orig_fieldsetting->getField());
399 $new_fieldsetting->cloneStructure($orig_fieldsetting);
420 return self::where(array(
'table_id' =>
$table_id))->orderBy(
'tableview_order')->get();
431 return self::where(array(
'table_id' =>
$table_id))->orderBy(
'tableview_order')->count();
443 if ($standardview = self::where(array(
'table_id' =>
$table_id))->
orderBy(
'tableview_order')->
first()) {
444 return $standardview;
448 $rbacreview = $DIC[
'rbacreview'];
450 foreach ($rbacreview->getParentRoleIds(
$_GET[
'ref_id']) as $role_array) {
451 $roles[] = $role_array[
'obj_id'];
456 if (
$_GET[
'ref_id']) {
458 $rbacreview = $DIC[
'rbacreview'];
460 foreach ($rbacreview->getParentRoleIds(
$_GET[
'ref_id']) as $role_array) {
461 $roles[] = $role_array[
'obj_id'];
463 $view->setRoles(array_merge(
$roles, $rbacreview->getLocalRoles(
$_GET[
'ref_id'])));
468 $view->setTitle(
$lng->txt(
'dcl_title_standardview'));
469 $view->setTableviewOrder(10);
470 $view->create($create_default_settings);
static setCloneOf($old, $new, $type)
cloneStructure(ilDclTableView $orig, array $new_fields)
createFieldSetting($field_id)
create ilDclTableViewFieldSetting for this tableview and the given field id
wakeUp($field_name, $field_value)
getFilterableFieldSettings()
getFilterableFields Returns all fieldsetting-objects of this tableview which have set their filterabl...
static getAllForTableId($table_id)
static getCountForTableId($table_id)
static getTableCache($table_id=0)
static where($where, $operator=null)
Class ilDclTableViewFieldSetting.
setTableviewOrder($tableview_order)
static returnDbTableName()
create($create_default_settings=true)
createDefaultSettings()
create default ilDclTableViewFieldSetting entries
static _isStandardField($field_id)
static createOrGetStandardView($table_id, $create_default_settings=true)
setDescription($description)
getVisibleFields()
Returns all field-objects of this tableview which have set their visibility to true, including standard fields.
if(empty($password)) $table
static orderBy($orderBy, $orderDirection='ASC')
copy($a_id, $a_parent_type="", $a_parent_id=0, $a_clone_mobs=false)
Copy page.
Class ilDclDetailedViewDefinition.