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


PHP FunctionsEdit::createAddForm方法代碼示例

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


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

示例1:

 $record = GedcomRecord::getInstance($xref, $WT_TREE);
 check_record_access($record);
 $controller->setPageTitle($record->getFullName() . ' - ' . GedcomTag::getLabel($fact, $record))->pageHeader();
 $level0type = $record::RECORD_TYPE;
 echo '<div id="edit_interface-page">';
 echo '<h4>', $controller->getPageTitle(), '</h4>';
 FunctionsPrint::initializeCalendarPopup();
 echo '<form name="addform" method="post" action="edit_interface.php" enctype="multipart/form-data">';
 echo '<input type="hidden" name="ged" value="', $WT_TREE->getNameHtml(), '">';
 echo '<input type="hidden" name="action" value="update">';
 echo '<input type="hidden" name="xref" value="', $xref, '">';
 echo '<input type="hidden" name="prev_action" value="add">';
 echo '<input type="hidden" name="fact_type" value="' . $fact . '">';
 echo Filter::getCsrf();
 echo '<table class="facts_table">';
 FunctionsEdit::createAddForm($fact);
 echo keep_chan($record);
 echo '</table>';
 // Genealogical facts (e.g. for INDI and FAM records) can have 2 SOUR/NOTE/OBJE/ASSO/RESN ...
 if ($level0type === 'INDI' || $level0type === 'FAM') {
     // ... but not facts which are simply links to other records
     if ($fact !== 'OBJE' && $fact !== 'NOTE' && $fact !== 'SHARED_NOTE' && $fact !== 'REPO' && $fact !== 'SOUR' && $fact !== 'ASSO' && $fact !== 'ALIA') {
         FunctionsEdit::printAddLayer('SOUR');
         FunctionsEdit::printAddLayer('OBJE');
         // Don’t add notes to notes!
         if ($fact !== 'NOTE') {
             FunctionsEdit::printAddLayer('NOTE');
             FunctionsEdit::printAddLayer('SHARED_NOTE', 2, $fact);
         }
         FunctionsEdit::printAddLayer('ASSO');
         // allow to add godfather and godmother for CHR fact or best man and bridesmaid  for MARR fact in one window
開發者ID:jflash,項目名稱:webtrees,代碼行數:31,代碼來源:edit_interface.php


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