ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilRoleAutoCompleteInputGUI.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 include_once("./Services/Form/classes/class.ilTextInputGUI.php");
5 
14 {
21  public function __construct($a_title, $a_postvar, $a_class, $a_autocomplete_cmd)
22  {
23  global $DIC;
24 
25  $this->ctrl = $DIC->ctrl();
26  $ilCtrl = $DIC->ctrl();
27 
28  if (is_object($a_class)) {
29  $a_class = get_class($a_class);
30  }
31  $a_class = strtolower($a_class);
32 
33  parent::__construct($a_title, $a_postvar);
34  $this->setInputType("raci");
35  $this->setMaxLength(70);
36  $this->setSize(30);
37  $this->setDataSource($ilCtrl->getLinkTargetByClass($a_class, $a_autocomplete_cmd, "", true));
38  }
39 
43  public static function echoAutoCompleteList()
44  {
45  $q = $_REQUEST["term"];
46  include_once("./Services/AccessControl/classes/class.ilRoleAutoComplete.php");
47  $list = ilRoleAutoComplete::getList($q);
48  echo $list;
49  exit;
50  }
51 }
setDataSource($href, $a_delimiter=null)
set datasource link for js autocomplete
exit
Definition: login.php:29
__construct($a_title, $a_postvar, $a_class, $a_autocomplete_cmd)
Constructor.
static getList($a_str)
Get completion list.
global $ilCtrl
Definition: ilias.php:18
static echoAutoCompleteList()
Static asynchronous default auto complete function.
setSize($a_size)
Set Size.
setMaxLength($a_maxlength)
Set Max Length.
This class represents a role + autocomplete feature form input.
__construct(Container $dic, ilPlugin $plugin)
$DIC
Definition: xapitoken.php:46
setInputType($a_type)
set input type