本文整理汇总了PHP中ilTable2GUI::disable方法的典型用法代码示例。如果您正苦于以下问题:PHP ilTable2GUI::disable方法的具体用法?PHP ilTable2GUI::disable怎么用?PHP ilTable2GUI::disable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilTable2GUI
的用法示例。
在下文中一共展示了ilTable2GUI::disable方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: vatsObject
public function vatsObject()
{
global $ilAccess;
if (!$ilAccess->checkAccess('read', '', $this->object->getRefId())) {
$this->ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $this->ilErr->MESSAGE);
}
include_once 'Services/Table/classes/class.ilTable2GUI.php';
$tbl = new ilTable2GUI($this, 'vats');
$tbl->setId('pay_vats_tbl');
$tbl->setFormAction($this->ctrl->getFormAction($this), 'createVat');
$tbl->setTitle($this->lng->txt('payment_tax_rates'));
$tbl->setRowTemplate('tpl.shop_vats_list_row.html', 'Services/Payment');
$tbl->setDefaultOrderField('title');
$tbl->addColumn('', 'check', '1%');
$tbl->addColumn($this->lng->txt('vat_title'), 'vat_title', '33%');
$tbl->addColumn($this->lng->txt('vat_rate'), 'vat_rate', '33%');
$tbl->addColumn('', 'commands', '33%');
$oShopVatsList = new ilShopVatsList();
$oShopVatsList->read();
$result = array();
$_SESSION['count_vats'] = $oShopVatsList->getNumItems();
if ($oShopVatsList->hasItems()) {
$tbl->enable('select_all');
$tbl->setSelectAllCheckbox('vat_id');
$counter = 0;
foreach ($oShopVatsList as $oVAT) {
$result[$counter]['check'] = ilUtil::formCheckbox(0, 'vat_id[]', $oVAT->getId());
$result[$counter]['vat_title'] = $oVAT->getTitle();
$result[$counter]['vat_rate'] = ilShopUtils::_formatVAT((double) $oVAT->getRate());
$this->ctrl->setParameter($this, 'vat_id', $oVAT->getId());
$result[$counter]['edit_text'] = $this->lng->txt('edit');
$result[$counter]['edit_url'] = $this->ctrl->getLinkTarget($this, 'editVat');
$result[$counter]['delete_text'] = $this->lng->txt('delete');
$result[$counter]['delete_url'] = $this->ctrl->getLinkTarget($this, 'confirmDeleteVat');
$this->ctrl->clearParameters($this);
++$counter;
}
$tbl->addMultiCommand('confirmDeleteVat', $this->lng->txt('delete'));
} else {
$tbl->disable('header');
$tbl->disable('footer');
$tbl->setNoEntriesText($this->lng->txt('paya_no_vats_assigned'));
}
$tbl->setData($result);
$tbl->addCommandButton('createVat', $this->lng->txt('paya_insert_vats'));
$this->tpl->setContent($tbl->getHTML());
return true;
}
示例2: showMembersList
public function showMembersList()
{
if (!$this->mlists->getCurrentMailingList()->getId()) {
$this->showMailingLists();
return true;
}
$this->ctrl->setParameter($this, 'cmd', 'post');
$this->ctrl->setParameter($this, 'ml_id', $this->mlists->getCurrentMailingList()->getId());
$this->tpl->setTitle($this->lng->txt('mail_addressbook'));
$this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.mail_mailing_lists_members.html', 'Services/Contact');
$tbl = new ilTable2GUI($this);
$tbl->setId('show_mlng_mmbrs_list_tbl');
$tbl->setFormAction($this->ctrl->getFormAction($this), 'showMemberForm');
$tbl->setTitle($this->lng->txt('mail_members_of_mailing_list') . ' ' . $this->mlists->getCurrentMailingList()->getTitle());
$tbl->setRowTemplate('tpl.mail_mailing_lists_membersrow.html', 'Services/Contact');
$this->ctrl->setParameter($this, 'cmd', 'showMembersList');
$tbl->setDefaultOrderField('title');
$result = array();
$tbl->addColumn('', 'check', '10%');
$tbl->addColumn($this->lng->txt('title'), 'title', '90%');
$assigned_entries = $this->mlists->getCurrentMailingList()->getAssignedEntries();
if (count($assigned_entries)) {
$tbl->enable('select_all');
$tbl->setSelectAllCheckbox('a_id');
$counter = 0;
foreach ($assigned_entries as $entry) {
$result[$counter]['check'] = ilUtil::formCheckbox(0, 'a_id[]', $entry['a_id']);
$result[$counter]['title'] = $entry['login'] != '' ? $entry['login'] : $entry['email'];
++$counter;
}
$tbl->addMultiCommand('confirmDeleteMembers', $this->lng->txt('delete'));
} else {
$tbl->disable('header');
$tbl->disable('footer');
$tbl->setNoEntriesText($this->lng->txt('mail_search_no'));
}
$tbl->setData($result);
$tbl->addCommandButton('showAssignmentForm', $this->lng->txt('add'));
$tbl->addCommandButton('showMailingLists', $this->lng->txt('back'));
$this->tpl->setVariable('MEMBERS_LIST', $tbl->getHTML());
$this->tpl->show();
return true;
}
示例3: showModerators
public function showModerators()
{
/**
* @var $ilToolbar ilToolbarGUI */
global $ilToolbar;
$this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.forum_moderators.html', 'Modules/Forum');
// search button
$ilToolbar->addButton($this->lng->txt("search_users"), $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', 'start'));
$tbl = new ilTable2GUI($this);
$tbl->setId('frm_show_mods_tbl_' . $_GET['ref_id']);
$tbl->setFormAction($this->ctrl->getFormAction($this, 'detachModeratorRole'));
$tbl->setTitle($this->lng->txt('frm_moderators'));
$tbl->setRowTemplate('tpl.forum_moderators_table_row.html', 'Modules/Forum');
$tbl->addColumn('', 'check', '1%');
$tbl->addColumn($this->lng->txt('login'), 'login', '30%');
$tbl->addColumn($this->lng->txt('firstname'), 'firstname', '30%');
$tbl->addColumn($this->lng->txt('lastname'), 'lastname', '30%');
$tbl->setDefaultOrderField('login');
$entries = $this->oForumModerators->getCurrentModerators();
$result = array();
if (count($entries)) {
$counter = 0;
foreach ($entries as $usr_id) {
$oUser = ilObjectFactory::getInstanceByObjId($usr_id, false);
if (is_object($oUser)) {
if (count($entries) > 1) {
$result[$counter]['check'] = ilUtil::formCheckbox(0, 'usr_id[]', $oUser->getId());
}
$result[$counter]['login'] = $oUser->getLogin();
$result[$counter]['firstname'] = $oUser->getFirstname();
$result[$counter]['lastname'] = $oUser->getLastname();
++$counter;
}
}
if (count($entries) > 1) {
$tbl->enable('select_all');
$tbl->setSelectAllCheckbox('usr_id');
$tbl->addMultiCommand('detachModeratorRole', $this->lng->txt('frm_detach_moderator_role'));
}
} else {
$tbl->disable('header');
$tbl->disable('footer');
$tbl->setNoEntriesText($this->lng->txt('frm_moderators_not_exist_yet'));
}
$tbl->setData($result);
$this->tpl->setVariable('TXT_FORUM_MODERATORS', $tbl->getHTML());
}
示例4: moveThreadsObject
public function moveThreadsObject()
{
/**
* @var $lng ilLanguage
* @var $ilToolbar ilToolbarGUI
* @var $tree ilTree
*/
global $lng, $ilToolbar, $tree;
if (!$this->is_moderator) {
$this->ilias->raiseError($lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
}
$threads2move = $_SESSION['threads2move'];
if (empty($threads2move)) {
ilUtil::sendInfo($this->lng->txt('select_at_least_one_thread'), true);
$this->ctrl->redirect($this, 'showThreads');
}
$this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.forums_threads_move.html', 'Modules/Forum');
if (!$this->hideToolbar()) {
$ilToolbar->addButton($this->lng->txt('back'), $this->ctrl->getLinkTarget($this));
}
$tblThr = new ilTable2GUI($this);
$tblThr->setId('il_frm_thread_move_table_' . $this->object->getRefId());
$tblThr->setTitle($this->lng->txt('move_chosen_topics'));
$tblThr->addColumn($this->lng->txt('subject'), 'top_name', '100%');
$tblThr->disable('header');
$tblThr->disable('footer');
$tblThr->disable('linkbar');
$tblThr->disable('sort');
$tblThr->disable('linkbar');
$tblThr->setLimit(0);
$tblThr->setRowTemplate('tpl.forums_threads_move_thr_row.html', 'Modules/Forum');
$tblThr->setDefaultOrderField('is_sticky');
$counter = 0;
$result = array();
foreach ($threads2move as $thr_pk) {
$objCurrentTopic = new ilForumTopic($thr_pk, $this->is_moderator);
$result[$counter]['num'] = $counter + 1;
$result[$counter]['thr_subject'] = $objCurrentTopic->getSubject();
unset($objCurrentTopic);
++$counter;
}
$tblThr->setData($result);
$this->tpl->setVariable('THREADS_TABLE', $tblThr->getHTML());
// selection tree
require_once 'Modules/Forum/classes/class.ilForumMoveTopicsExplorer.php';
$exp = new ilForumMoveTopicsExplorer($this->ctrl->getLinkTarget($this, 'moveThreads'), 'frm_topic_paste_expand');
$exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'moveThreads'));
$exp->setTargetGet('ref_id');
$exp->setPostVar('frm_ref_id');
$exp->excludeObjIdFromSelection($this->object->getId());
$exp->setCheckedItem(isset($_POST['frm_ref_id']) && (int) $_POST['frm_ref_id'] ? (int) $_POST['frm_ref_id'] : 0);
// open current position in tree
if (!is_array($_SESSION['frm_topic_paste_expand'])) {
$_SESSION['frm_topic_paste_expand'] = array();
$path = $tree->getPathId($this->object->getRefId());
foreach ((array) $path as $node_id) {
if (!in_array($node_id, $_SESSION['frm_topic_paste_expand'])) {
$_SESSION['frm_topic_paste_expand'][] = $node_id;
}
}
}
if (!isset($_GET['frm_topic_paste_expand']) || $_GET['frm_topic_paste_expand'] == '') {
$expanded = $tree->readRootId();
} else {
$expanded = $_GET['frm_topic_paste_expand'];
}
$exp->setExpand($expanded);
// build html-output
$exp->setOutput(0);
$output = $exp->getOutput();
$this->tpl->setVariable('FRM_SELECTION_TREE', $output);
$this->tpl->setVariable('CMD_SUBMIT', 'performMoveThreads');
$this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('move'));
$this->tpl->setVariable('FORMACTION', $this->ctrl->getFormAction($this, 'performMoveThreads'));
return true;
}
示例5: moveThreadsObject
public function moveThreadsObject()
{
/**
* @var $lng ilLanguage
* @var $ilToolbar ilToolbarGUI
* @var $tree ilTree
*/
global $lng, $ilToolbar, $tree;
if (!$this->is_moderator) {
$this->ilias->raiseError($lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
}
$threads2move = $_SESSION['threads2move'];
if (!count($threads2move)) {
ilUtil::sendInfo($this->lng->txt('select_at_least_one_thread'), true);
$this->ctrl->redirect($this, 'showThreads');
}
require_once 'Modules/Forum/classes/class.ilForumMoveTopicsExplorer.php';
$exp = new ilForumMoveTopicsExplorer($this, 'moveThreads');
$exp->setPathOpen($this->object->getRefId());
$exp->setNodeSelected(isset($_POST['frm_ref_id']) && (int) $_POST['frm_ref_id'] ? (int) $_POST['frm_ref_id'] : 0);
$exp->setCurrentFrmRefId($this->object->getRefId());
$exp->setHighlightedNode($this->object->getRefId());
if (!$exp->handleCommand()) {
$this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.forums_threads_move.html', 'Modules/Forum');
if (!$this->hideToolbar()) {
$ilToolbar->addButton($this->lng->txt('back'), $this->ctrl->getLinkTarget($this));
}
$tblThr = new ilTable2GUI($this);
$tblThr->setId('il_frm_thread_move_table_' . $this->object->getRefId());
$tblThr->setTitle($this->lng->txt('move_chosen_topics'));
$tblThr->addColumn($this->lng->txt('subject'), 'top_name', '100%');
$tblThr->disable('header');
$tblThr->disable('footer');
$tblThr->disable('linkbar');
$tblThr->disable('sort');
$tblThr->disable('linkbar');
$tblThr->setLimit(PHP_INT_MAX);
$tblThr->setRowTemplate('tpl.forums_threads_move_thr_row.html', 'Modules/Forum');
$tblThr->setDefaultOrderField('is_sticky');
$counter = 0;
$result = array();
foreach ($threads2move as $thr_pk) {
$objCurrentTopic = new ilForumTopic($thr_pk, $this->is_moderator);
$result[$counter]['num'] = $counter + 1;
$result[$counter]['thr_subject'] = $objCurrentTopic->getSubject();
unset($objCurrentTopic);
++$counter;
}
$tblThr->setData($result);
$this->tpl->setVariable('THREADS_TABLE', $tblThr->getHTML());
$this->tpl->setVariable('FRM_SELECTION_TREE', $exp->getHTML());
$this->tpl->setVariable('CMD_SUBMIT', 'performMoveThreads');
$this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('move'));
$this->tpl->setVariable('FORMACTION', $this->ctrl->getFormAction($this, 'performMoveThreads'));
}
return true;
}