當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Portfolio::actions方法代碼示例

本文整理匯總了PHP中Portfolio::actions方法的典型用法代碼示例。如果您正苦於以下問題:PHP Portfolio::actions方法的具體用法?PHP Portfolio::actions怎麽用?PHP Portfolio::actions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Portfolio的用法示例。


在下文中一共展示了Portfolio::actions方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_lang

$table->set_header($column++, get_lang('Name'));
$table->set_header($column++, get_lang('Size'), true, array('style' => 'width:50px;'));
$table->set_header($column++, get_lang('Date'), true, array('style' => 'width:150px;'));
// Admins get an edit column
if ($is_allowed_to_edit || $group_member_with_upload_rights || DocumentManager::is_my_shared_folder(api_get_user_id(), $curdirpath, $sessionId)) {
    $table->set_header($column++, get_lang('Actions'), false, array('class' => 'td_actions'));
}
// Actions on multiple selected documents
// TODO: Currently only delete action -> take only DELETE permission into account
if (count($documentAndFolders) > 1) {
    if ($is_allowed_to_edit || $group_member_with_upload_rights) {
        $form_actions = array();
        $form_action['set_invisible'] = get_lang('SetInvisible');
        $form_action['set_visible'] = get_lang('SetVisible');
        $form_action['delete'] = get_lang('Delete');
        $portfolio_actions = Portfolio::actions();
        foreach ($portfolio_actions as $action) {
            $form_action[$action->get_name()] = $action->get_title();
        }
        $table->set_form_actions($form_action, 'ids');
    }
}
//Display::display_header('', 'Doc');
/* Introduction section (editable by course admins) */
if (!empty($groupId)) {
    Display::display_introduction_section(TOOL_DOCUMENT . $groupId);
} else {
    Display::display_introduction_section(TOOL_DOCUMENT);
}
$toolbar = Display::toolbarAction('toolbar-document', array(0 => $actionsLeft, 1 => $actionsRight));
echo $toolbar;
開發者ID:omaoibrahim,項目名稱:chamilo-lms,代碼行數:31,代碼來源:document.php


注:本文中的Portfolio::actions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。