本文整理汇总了PHP中ilRadioGroupInputGUI::setTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP ilRadioGroupInputGUI::setTitle方法的具体用法?PHP ilRadioGroupInputGUI::setTitle怎么用?PHP ilRadioGroupInputGUI::setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilRadioGroupInputGUI
的用法示例。
在下文中一共展示了ilRadioGroupInputGUI::setTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editPriceObject
public function editPriceObject()
{
$this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
$price_id = $_GET['price_id'] ? $_GET['price_id'] : $_POST['price_id'];
$price = ilPaymentPrices::_getPrice($price_id);
$this->ctrl->setParameter($this, 'pobject_id', (int) $_GET['pobject_id']);
$tmp_pobject = ilPaymentObject::_getObjectData($_GET['pobject_id']);
include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$tmp_obj = ilObjectFactory::getInstanceByRefId($tmp_pobject['ref_id'], false);
if ($tmp_obj) {
$form->setTitle($tmp_obj->getTitle());
} else {
$form->setTitle($this->lng->txt('object_not_found'));
}
//price_type
$radio_group = new ilRadioGroupInputGUI('', 'price_type');
$radio_group->setTitle($this->lng->txt('duration'));
$radio_group->setRequired(true);
$radio_group->setValue($price['price_type']);
$radio_group->setPostVar('price_type');
$radio_option_1 = new ilRadioOption($this->lng->txt('duration_month'), ilPaymentPrices::TYPE_DURATION_MONTH);
// duration month
$oDuration = new ilNumberInputGUI();
$oDuration->setTitle($this->lng->txt('paya_months'));
$oDuration->setSize('20%');
$oDuration->setValue($price['duration']);
$oDuration->setPostVar('duration_month');
$radio_option_1->addSubItem($oDuration);
$radio_group->addOption($radio_option_1);
$radio_option_3 = new ilRadioOption($this->lng->txt('duration_date'), ilPaymentPrices::TYPE_DURATION_DATE);
// duration_date from
$o_date_from = new ilDateTimeInputGUI();
$o_date_from->setTitle($this->lng->txt('cal_from'));
$o_date_from->setDate(new ilDate($price['duration_from'], IL_CAL_DATE));
$o_date_from->setPostVar('duration_date_from');
$radio_option_3->addSubItem($o_date_from);
// duration_date until
$o_date_until = new ilDateTimeInputGUI();
$o_date_until->setTitle($this->lng->txt('cal_until'));
$o_date_until->setDate(new ilDate($price['duration_until'], IL_CAL_DATE));
$o_date_until->setPostVar('duration_date_until');
$radio_option_3->addSubItem($o_date_until);
$radio_group->addOption($radio_option_3);
$radio_option_2 = new ilRadioOption($this->lng->txt('unlimited_duration'), ilPaymentPrices::TYPE_UNLIMITED_DURATION);
$radio_group->addOption($radio_option_2);
$form->addItem($radio_group);
// description
$oDescription = new ilTextAreaInputGUI($this->lng->txt('description'), 'description');
$oDescription->setRows(4);
$oDescription->setCols(35);
$oDescription->setValue($price['description']);
$form->addItem($oDescription);
// price
$oPrice = new ilNumberInputGUI();
$oPrice->setTitle($this->lng->txt('price_a'));
$oPrice->setSize('20%');
$oPrice->setRequired(true);
$oPrice->setValue($price['price']);
include_once './Services/Payment/classes/class.ilPaymentSettings.php';
$genSet = ilPaymentSettings::_getInstance();
$oPrice->setInfo($genSet->get('currency_unit'));
$oPrice->setPostVar('price');
$oPrice->allowDecimals(true);
$form->addItem($oPrice);
//extension
$oExtension = new ilCheckboxInputGUI($this->lng->txt('extension_price'), 'extension');
$oExtension->setChecked($price['extension']);
$form->addItem($oExtension);
$o_hidden_1 = new ilHiddenInputGUI('pobject_id');
$o_hidden_1->setValue((int) $_GET['pobject_id']);
$o_hidden_1->setPostVar('pobject_id');
$o_hidden_2 = new ilHiddenInputGUI('price_id');
$o_hidden_2->setValue((int) $_GET['price_id']);
$o_hidden_2->setPostVar('price_id');
$form->addItem($o_hidden_1);
$form->addItem($o_hidden_2);
$form->addCommandButton('updatePrice', $this->lng->txt('save'));
$form->addCommandButton('editPrices', $this->lng->txt('cancel'));
$this->tpl->setVariable('FORM', $form->getHTML());
}
示例2: settings
public function settings()
{
global $rbacreview;
$this->tabs_gui->setSubTabActive('shib_settings');
// set already saved data or default value for port
$settings = $this->ilias->getAllSettings();
// Compose role list
$role_list = $rbacreview->getRolesByFilter(2);
$role = array();
if (!isset($settings["shib_user_default_role"])) {
$settings["shib_user_default_role"] = 4;
}
if (!isset($settings["shib_idp_list"]) || $settings["shib_idp_list"] == '') {
$settings["shib_idp_list"] = "urn:mace:organization1:providerID, Example Organization 1\nurn:mace:organization2:providerID, Example Organization 2, /Shibboleth.sso/WAYF/SWITCHaai";
}
if (!isset($settings["shib_login_button"]) || $settings["shib_login_button"] == '') {
$settings["shib_login_button"] = "templates/default/images/shib_login_button.png";
}
if (!isset($settings["shib_hos_type"]) || $settings["shib_hos_type"] == '') {
$settings["shib_hos_type"] = 'internal_wayf';
}
foreach ($role_list as $data) {
$role[$data["obj_id"]] = $data["title"];
}
// Set text field content
$shib_settings = array('shib_login', 'shib_title', 'shib_firstname', 'shib_lastname', 'shib_email', 'shib_gender', 'shib_institution', 'shib_department', 'shib_zipcode', 'shib_city', 'shib_country', 'shib_street', 'shib_phone_office', 'shib_phone_home', 'shib_phone_mobile', 'shib_language', 'shib_matriculation');
//set PropertyFormGUI
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$propertys = new ilPropertyFormGUI();
$propertys->setTitle($this->lng->txt("shib"));
$propertys->setFormAction($this->ctrl->getFormAction($this, "save"));
$propertys->addCommandButton("save", $this->lng->txt("save"));
$propertys->addCommandButton("settings", $this->lng->txt("cancel"));
//set enable shibboleth support
$enable = new ilCheckboxInputGUI();
$enable->setTitle($this->lng->txt("shib_active"));
$read_me_link = "./Services/AuthShibboleth/README.SHIBBOLETH.txt";
$info = "<a href='" . $read_me_link . "' target='_blank'>" . $this->lng->txt("auth_shib_instructions") . "</a>";
$enable->setInfo($info);
$enable->setPostVar("shib[active]");
$enable->setChecked($settings["shib_active"]);
//set allow local authentication
$local = new ilCheckboxInputGUI();
$local->setTitle($this->lng->txt("auth_allow_local"));
$local->setPostVar("shib[auth_allow_local]");
$local->setChecked($settings['shib_auth_allow_local']);
//set user default role
$defaultrole = new ilSelectInputGUI();
$defaultrole->setTitle($this->lng->txt("shib_user_default_role"));
$defaultrole->setPostVar("shib[user_default_role]");
$defaultrole->setOptions($role);
$defaultrole->setRequired(true);
$defaultrole->setValue($settings["shib_user_default_role"]);
//set name of federation
$name = new ilTextInputGUI();
$name->setTitle($this->lng->txt("shib_federation_name"));
$name->setPostVar("shib[federation_name]");
$name->setSize(40);
$name->setMaxLength(50);
$name->setRequired(true);
$name->setValue(stripslashes($settings["shib_federation_name"]));
//set Organize selection group
include_once "./Services/Form/classes/class.ilRadioGroupInputGUI.php";
include_once "./Services/Form/classes/class.ilRadioOption.php";
$organize = new ilRadioGroupInputGUI();
$organize->setTitle($this->lng->txt("shib_login_type"));
$organize->setPostVar("shib[hos_type]");
$organize->setRequired(true);
$organize->setValue($settings["shib_hos_type"]);
//set 1. option internalwayf
$internalwayf = new ilRadioOption();
$internalwayf->setTitle($this->lng->txt("shib_login_internal_wayf"));
$internalwayf->setValue("internal_wayf");
//set 1. option internalwayf textbox idplist
$idplist = new ilTextAreaInputGUI();
$idplist->setInfo($this->lng->txt("shib_idp_list"));
$idplist->setPostVar("shib[idp_list]");
$idplist->setRows(3);
$idplist->setCols(50);
$idplist->setValue($settings["shib_idp_list"]);
//set 2. Option externalwayf
$externalwayf = new ilRadioOption();
$externalwayf->setTitle($this->lng->txt("shib_login_external_wayf"));
$externalwayf->setValue("external_wayf");
//set 2. Option externalwayf textfield path to login button image
$loginbutton = new ilTextInputGUI();
$loginbutton->setInfo($this->lng->txt("shib_login_button"));
$loginbutton->setPostVar("shib[login_button]");
$loginbutton->setSize(50);
$loginbutton->setMaxLength(255);
$loginbutton->setValue($settings["shib_login_button"]);
//set 3. Option embeddedwayf
$embeddedwayf = new ilRadioOption();
$embeddedwayf->setTitle($this->lng->txt("shib_login_embedded_wayf"));
$embeddedwayf->setInfo($this->lng->txt("shib_login_embedded_wayf_description"));
$embeddedwayf->setValue("embedded_wayf");
//set login instructions
$logininstruction = new ilTextAreaInputGUI();
$logininstruction->setTitle($this->lng->txt("auth_login_instructions"));
$logininstruction->setPostVar("shib[login_instructions]");
//.........这里部分代码省略.........