本文整理汇总了PHP中ilTextInputGUI::setDataSourceSubmitUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP ilTextInputGUI::setDataSourceSubmitUrl方法的具体用法?PHP ilTextInputGUI::setDataSourceSubmitUrl怎么用?PHP ilTextInputGUI::setDataSourceSubmitUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilTextInputGUI
的用法示例。
在下文中一共展示了ilTextInputGUI::setDataSourceSubmitUrl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initFormSearch
public function initFormSearch(ilObjUser $user = NULL)
{
global $ilCtrl;
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($this->ctrl->getFormAction($this, 'search'));
$this->form->setTitle($this->getTitle());
$this->form->addCommandButton('performSearch', $this->lng->txt('search'));
$this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
$kind = new ilRadioGroupInputGUI($this->lng->txt('search_type'), 'search_for');
$kind->setValue($this->search_type);
$this->form->addItem($kind);
// Users
$users = new ilRadioOption($this->lng->txt('search_for_users'), 'usr');
// UDF
include_once 'Services/Search/classes/class.ilUserSearchOptions.php';
foreach (ilUserSearchOptions::_getSearchableFieldsInfo(!$this->isSearchableCheckEnabled()) as $info) {
switch ($info['type']) {
case FIELD_TYPE_UDF_SELECT:
case FIELD_TYPE_SELECT:
$sel = new ilSelectInputGUI($info['lang'], "rep_query[usr][" . $info['db'] . "]");
$sel->setOptions($info['values']);
$users->addSubItem($sel);
break;
case FIELD_TYPE_MULTI:
case FIELD_TYPE_UDF_TEXT:
case FIELD_TYPE_TEXT:
if (isset($info['autoComplete']) and $info['autoComplete']) {
$ilCtrl->setParameterByClass(get_class($this), 'autoCompleteField', $info['db']);
$ul = new ilTextInputGUI($info['lang'], "rep_query[usr][" . $info['db'] . "]");
$ul->setDataSourceSubmitOnSelection(TRUE);
$ul->setDataSourceSubmitUrl($this->ctrl->getLinkTarget($this, 'showSearchSelected', '', FALSE, FALSE));
$ul->setDataSource($ilCtrl->getLinkTarget($this, "doUserAutoComplete", "", true));
$ul->setSize(30);
$ul->setMaxLength(120);
if ($user instanceof ilObjUser) {
switch ($info['db']) {
case 'firstname':
$ul->setValue($user->getFirstname());
break;
case 'lastname':
$ul->setValue($user->getLastname());
break;
case 'login':
$ul->setValue($user->getLogin());
break;
}
}
$users->addSubItem($ul);
} else {
$txt = new ilTextInputGUI($info['lang'], "rep_query[usr][" . $info['db'] . "]");
$txt->setSize(30);
$txt->setMaxLength(120);
$users->addSubItem($txt);
}
break;
}
}
$kind->addOption($users);
// Role
$roles = new ilRadioOption($this->lng->txt('search_for_role_members'), 'role');
$role = new ilTextInputGUI($this->lng->txt('search_role_title'), 'rep_query[role][title]');
$role->setSize(30);
$role->setMaxLength(120);
$roles->addSubItem($role);
$kind->addOption($roles);
// Course
$groups = new ilRadioOption($this->lng->txt('search_for_crs_members'), 'crs');
$group = new ilTextInputGUI($this->lng->txt('search_crs_title'), 'rep_query[crs][title]');
$group->setSize(30);
$group->setMaxLength(120);
$groups->addSubItem($group);
$kind->addOption($groups);
// Group
$groups = new ilRadioOption($this->lng->txt('search_for_grp_members'), 'grp');
$group = new ilTextInputGUI($this->lng->txt('search_grp_title'), 'rep_query[grp][title]');
$group->setSize(30);
$group->setMaxLength(120);
$groups->addSubItem($group);
$kind->addOption($groups);
}