当前位置: 首页>>代码示例>>PHP>>正文


PHP DocumentRevision::get_document_revisions方法代码示例

本文整理汇总了PHP中DocumentRevision::get_document_revisions方法的典型用法代码示例。如果您正苦于以下问题:PHP DocumentRevision::get_document_revisions方法的具体用法?PHP DocumentRevision::get_document_revisions怎么用?PHP DocumentRevision::get_document_revisions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DocumentRevision的用法示例。


在下文中一共展示了DocumentRevision::get_document_revisions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testget_document_revisions

 public function testget_document_revisions()
 {
     $documentRevision = new DocumentRevision();
     $results = $documentRevision->get_document_revisions(1);
     $this->assertTrue(is_array($results));
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:6,代码来源:DocumentRevisionTest.php

示例2: display

 /**
  * @see SugarView::display()
  */
 public function display()
 {
     global $app_list_strings, $mod_strings;
     $load_signed = false;
     if (isset($_REQUEST['load_signed_id']) && !empty($_REQUEST['load_signed_id'])) {
         $load_signed = true;
         if (isset($_REQUEST['record'])) {
             $this->bean->related_doc_id = $_REQUEST['record'];
         }
         if (isset($_REQUEST['selected_revision_id'])) {
             $this->bean->related_doc_rev_id = $_REQUEST['selected_revision_id'];
         }
         $this->bean->id = null;
         $this->bean->document_name = null;
         $this->bean->filename = null;
         $this->bean->is_template = 0;
     }
     //if
     if (!empty($this->bean->id) || empty($this->bean->id) && !empty($_REQUEST['record']) && !empty($_REQUEST['action']) && strtolower($_REQUEST['action']) == 'quickedit') {
         $this->ss->assign("FILE_OR_HIDDEN", "hidden");
         if (!$this->ev->isDuplicate) {
             $this->ss->assign("DISABLED", "disabled");
         }
     } else {
         $this->bean->revision = 1;
         $this->ss->assign("FILE_OR_HIDDEN", "file");
     }
     $popup_request_data = array('call_back_function' => 'document_set_return', 'form_name' => 'EditView', 'field_to_name_array' => array('id' => 'related_doc_id', 'document_name' => 'related_document_name'));
     $json = getJSONobj();
     $this->ss->assign('encoded_document_popup_request_data', $json->encode($popup_request_data));
     //get related document name.
     if (!empty($this->bean->related_doc_id)) {
         $this->ss->assign("RELATED_DOCUMENT_NAME", Document::get_document_name($this->bean->related_doc_id));
         $this->ss->assign("RELATED_DOCUMENT_ID", $this->bean->related_doc_id);
         if (!empty($this->bean->related_doc_rev_id)) {
             $this->ss->assign("RELATED_DOCUMENT_REVISION_OPTIONS", get_select_options_with_id(DocumentRevision::get_document_revisions($this->bean->related_doc_id), $this->bean->related_doc_rev_id));
         } else {
             $this->ss->assign("RELATED_DOCUMENT_REVISION_OPTIONS", get_select_options_with_id(DocumentRevision::get_document_revisions($this->bean->related_doc_id), ''));
         }
     } else {
         $this->ss->assign("RELATED_DOCUMENT_REVISION_DISABLED", "disabled");
     }
     //set parent information in the form.
     if (isset($_REQUEST['parent_id'])) {
         $this->ss->assign("PARENT_ID", $_REQUEST['parent_id']);
     }
     //if
     if (isset($_REQUEST['parent_name'])) {
         $this->ss->assign("PARENT_NAME", $_REQUEST['parent_name']);
         if (!empty($_REQUEST['parent_type'])) {
             switch (strtolower($_REQUEST['parent_type'])) {
                 case "contracts":
                     $this->ss->assign("LBL_PARENT_NAME", $mod_strings['LBL_CONTRACT_NAME']);
                     break;
                     //todo remove leads case.
                 //todo remove leads case.
                 case "leads":
                     $this->ss->assign("LBL_PARENT_NAME", $mod_strings['LBL_CONTRACT_NAME']);
                     break;
             }
             //switch
         }
         //if
     }
     //if
     if (isset($_REQUEST['parent_type'])) {
         $this->ss->assign("PARENT_TYPE", $_REQUEST['parent_type']);
     }
     if ($load_signed) {
         $this->ss->assign("RELATED_DOCUMENT_REVISION_DISABLED", "disabled");
         $this->ss->assign("RELATED_DOCUMENT_BUTTON_AVAILABILITY", "hidden");
         $this->ss->assign("LOAD_SIGNED_ID", $_REQUEST['load_signed_id']);
     } else {
         $this->ss->assign("RELATED_DOCUMENT_BUTTON_AVAILABILITY", "button");
     }
     //if-else
     parent::display();
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:81,代码来源:view.edit.php

示例3: get_select_options_with_id

if (isset($focus->template_type)) {
    $xtpl->assign("TEMPLATE_TYPE_OPTIONS", get_select_options_with_id($app_list_strings['document_template_type_dom'], $focus->template_type));
} else {
    $xtpl->assign("TEMPLATE_TYPE_OPTIONS", get_select_options_with_id($app_list_strings['document_template_type_dom'], ''));
}
$popup_request_data = array('call_back_function' => 'document_set_return', 'form_name' => 'EditView', 'field_to_name_array' => array('id' => 'related_doc_id', 'document_name' => 'related_document_name'));
$json = getJSONobj();
$xtpl->assign('encoded_document_popup_request_data', $json->encode($popup_request_data));
//get related document name.
if (!empty($focus->related_doc_id)) {
    $xtpl->assign("RELATED_DOCUMENT_NAME", Document::get_document_name($focus->related_doc_id));
    $xtpl->assign("RELATED_DOCUMENT_ID", $focus->related_doc_id);
    if (!empty($focus->related_doc_rev_id)) {
        $xtpl->assign("RELATED_DOCUMENT_REVISION_OPTIONS", get_select_options_with_id(DocumentRevision::get_document_revisions($focus->related_doc_id), $focus->related_doc_rev_id));
    } else {
        $xtpl->assign("RELATED_DOCUMENT_REVISION_OPTIONS", get_select_options_with_id(DocumentRevision::get_document_revisions($focus->related_doc_id), ''));
    }
} else {
    $xtpl->assign("RELATED_DOCUMENT_REVISION_DISABLED", "disabled");
}
//set parent information in the form.
if (isset($_REQUEST['parent_id'])) {
    $xtpl->assign("PARENT_ID", $_REQUEST['parent_id']);
}
if (isset($_REQUEST['parent_name'])) {
    $xtpl->assign("PARENT_NAME", $_REQUEST['parent_name']);
    if (!empty($_REQUEST['parent_type'])) {
        switch (strtolower($_REQUEST['parent_type'])) {
            case "contracts":
                $xtpl->assign("LBL_PARENT_NAME", $mod_strings['LBL_CONTRACT_NAME']);
                break;
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:EditView.php


注:本文中的DocumentRevision::get_document_revisions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。