ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilMailMemberSearchTableGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Services/Table/classes/class.ilTable2GUI.php';
5
12{
16 protected $ctrl;
17
21 protected $lng;
22
26 public function __construct($a_parent_obj)
27 {
28 global $DIC;
29
30 $this->ctrl = $DIC['ilCtrl'];
31 $this->lng = $DIC['lng'];
32
33 $obj_id = ilObject::_lookupObjectId($a_parent_obj->ref_id);
34 $this->setId('mmsearch_'.$obj_id);
35 parent::__construct($a_parent_obj, 'showSelectableUsers');
36 $this->lng->loadLanguageModule('crs');
37 $this->lng->loadLanguageModule('grp');
38 $this->setTitle($this->lng->txt('members'));
39
40 $this->setFormAction($this->ctrl->getFormAction($a_parent_obj));
41 $this->ctrl->clearParameters($a_parent_obj);
42
43 $this->setRowTemplate('tpl.mail_member_search_row.html', 'Services/Contact');
44
45 // setup columns
46 $this->addColumn('', '', '1%', true);
47 $this->addColumn($this->lng->txt('login'), 'login', '22%');
48 $this->addColumn($this->lng->txt('name'), 'name', '22%');
49 $this->addColumn($this->lng->txt('role'), 'role', '22%');
50
51 $this->setSelectAllCheckbox('user_ids[]');
52 $this->setShowRowsSelector(true);
53
54 $this->addMultiCommand('sendMailToSelectedUsers', $this->lng->txt('mail_members'));
55 $this->addCommandButton('cancel', $this->lng->txt('cancel'));
56 }
57
61 public function fillRow($a_set)
62 {
63 foreach($a_set as $key => $value)
64 {
65 $this->tpl->setVariable(strtoupper($key), $value);
66 }
67 }
68}
An exception for terminatinating execution or to throw for unit testing.
static _lookupObjectId($a_ref_id)
lookup object id
Class ilTable2GUI.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
setId($a_val)
Set id.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
global $DIC