本文整理汇总了PHP中ilTable2GUI::fillRow方法的典型用法代码示例。如果您正苦于以下问题:PHP ilTable2GUI::fillRow方法的具体用法?PHP ilTable2GUI::fillRow怎么用?PHP ilTable2GUI::fillRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilTable2GUI
的用法示例。
在下文中一共展示了ilTable2GUI::fillRow方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fillRow
/**
* @param array $row
*/
public function fillRow(array $row)
{
/**
* @var $ilCtrl ilCtrl
*/
global $ilCtrl;
if ($this->getParentObject()->isCRUDContext()) {
$row['chb'] = ilUtil::formCheckbox(false, 'unit_ids[]', $row['unit_id']);
$sequence = new ilNumberInputGUI('', 'sequence[' . $row['unit_id'] . ']');
$sequence->setValue($this->position++ * 10);
$sequence->setMinValue(0);
$sequence->setSize(3);
$row['sequence'] = $sequence->render();
$action = new ilAdvancedSelectionListGUI();
$action->setId('asl_content_' . $row['unit_id']);
$action->setAsynch(false);
$action->setListTitle($this->lng->txt('actions'));
$ilCtrl->setParameter($this->getParentObject(), 'unit_id', $row['unit_id']);
$action->addItem($this->lng->txt('edit'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'showUnitModificationForm'));
$action->addItem($this->lng->txt('delete'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'confirmDeleteUnit'));
$ilCtrl->setParameter($this->getParentObject(), 'unit_id', '');
$row['actions'] = $action->getHtml();
}
if ($row['unit_id'] == $row['baseunit_id']) {
$row['baseunit'] = '';
}
parent::fillRow($row);
}
示例2: fillRow
/**
* @param array $row
*/
public function fillRow(array $row)
{
$old_value = ilDatePresentation::useRelativeDates();
ilDatePresentation::setUseRelativeDates(false);
$row['date'] = ilDatePresentation::formatDate(new ilDateTime($row['date'], IL_CAL_UNIX));
ilDatePresentation::setUseRelativeDates($old_value);
if (array_key_exists('percentage', $row)) {
$row['percentage'] = sprintf('%.2f', $row['percentage']) . '%';
}
if ($this->pdf_view && array_key_exists('pass_details', $row)) {
unset($row['pass_details']);
}
parent::fillRow($row);
}
示例3: fillRow
/**
* @param array $row
*/
public function fillRow(array $row)
{
/**
* @var $ilCtrl ilCtrl
*/
global $ilCtrl;
$row['chb'] = ilUtil::formCheckbox(false, 'category_ids[]', $row['category_id']);
$action = new ilAdvancedSelectionListGUI();
$action->setId('asl_content_' . $row['category_id']);
$action->setAsynch(false);
$action->setListTitle($this->lng->txt('actions'));
$ilCtrl->setParameter($this->getParentObject(), 'category_id', $row['category_id']);
$action->addItem($this->lng->txt('un_show_units'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'showUnitsOfCategory'));
if ($this->getParentObject()->isCRUDContext()) {
$action->addItem($this->lng->txt('edit'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'showUnitCategoryModificationForm'));
$action->addItem($this->lng->txt('delete'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'confirmDeleteCategory'));
} else {
$action->addItem($this->lng->txt('import'), '', $ilCtrl->getLinkTarget($this->getParentObject(), 'confirmImportGlobalCategory'));
}
$row['title_href'] = $ilCtrl->getLinkTarget($this->getParentObject(), 'showUnitsOfCategory');
$ilCtrl->setParameter($this->getParentObject(), 'category_id', '');
$row['actions'] = $action->getHtml();
parent::fillRow($row);
}
示例4: fillRow
/**
* @param array $row
*/
public function fillRow(array $row)
{
parent::fillRow(array('name' => $row['name'], 'checkbox' => ilUtil::formCheckbox(false, 'chb_defaults[]', $row['test_defaults_id']), 'tstamp' => ilDatePresentation::formatDate(new ilDateTime($row['tstamp'], IL_CAL_UNIX))));
}