ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 
4 require_once 'Services/Table/classes/class.ilTable2GUI.php';
5 
12 {
16  protected $ctrl;
17 
21  protected $lng;
22 
26  public function __construct($a_parent_obj, $a_parent_cmd = "", $a_template_context = "")
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, $a_parent_cmd);
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  $this->addColumn('', '', '1%', true);
46  $this->addColumn($this->lng->txt('login'), 'login', '22%');
47  $this->addColumn($this->lng->txt('name'), 'name', '22%');
48  $this->addColumn($this->lng->txt('role'), 'role', '22%');
49 
50  $this->setSelectAllCheckbox('user_ids[]');
51  $this->setShowRowsSelector(true);
52 
53  $this->addMultiCommand('sendMailToSelectedUsers', $this->lng->txt('mail_members'));
54  $this->addCommandButton('cancel', $this->lng->txt('cancel'));
55  }
56 
60  public function fillRow($a_set)
61  {
62  foreach ($a_set as $key => $value) {
63  $this->tpl->setVariable(strtoupper($key), $value);
64  }
65  }
66 }
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
__construct($a_parent_obj, $a_parent_cmd="", $a_template_context="")
global $DIC
Definition: saml.php:7
setId($a_val)
Set id.
static _lookupObjectId($a_ref_id)
lookup object id
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.
$key
Definition: croninfo.php:18