本文整理汇总了PHP中Fisharebest\Webtrees\Functions\FunctionsEdit::printAddLayer方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionsEdit::printAddLayer方法的具体用法?PHP FunctionsEdit::printAddLayer怎么用?PHP FunctionsEdit::printAddLayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fisharebest\Webtrees\Functions\FunctionsEdit
的用法示例。
在下文中一共展示了FunctionsEdit::printAddLayer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: print_indi_form
//.........这里部分代码省略.........
FunctionsEdit::addSimpleTag('0 SEX F');
} else {
FunctionsEdit::addSimpleTag('0 SEX');
}
$bdm = 'BD';
if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $WT_TREE->getPreference('QUICK_REQUIRED_FACTS'), $matches)) {
foreach ($matches[1] as $match) {
if (!in_array($match, explode('|', WT_EVENTS_DEAT))) {
FunctionsEdit::addSimpleTags($match);
}
}
}
//-- if adding a spouse add the option to add a marriage fact to the new family
if ($nextaction === 'add_spouse_to_individual_action' || $nextaction === 'add_spouse_to_family_action') {
$bdm .= 'M';
if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $WT_TREE->getPreference('QUICK_REQUIRED_FAMFACTS'), $matches)) {
foreach ($matches[1] as $match) {
FunctionsEdit::addSimpleTags($match);
}
}
}
if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $WT_TREE->getPreference('QUICK_REQUIRED_FACTS'), $matches)) {
foreach ($matches[1] as $match) {
if (in_array($match, explode('|', WT_EVENTS_DEAT))) {
FunctionsEdit::addSimpleTags($match);
}
}
}
}
echo keep_chan($person);
echo '</table>';
if ($nextaction === 'update') {
// GEDCOM 5.5.1 spec says NAME doesn’t get a OBJE
FunctionsEdit::printAddLayer('SOUR');
FunctionsEdit::printAddLayer('NOTE');
FunctionsEdit::printAddLayer('SHARED_NOTE');
FunctionsEdit::printAddLayer('RESN');
} else {
FunctionsEdit::printAddLayer('SOUR', 1);
FunctionsEdit::printAddLayer('NOTE', 1);
FunctionsEdit::printAddLayer('SHARED_NOTE', 1);
FunctionsEdit::printAddLayer('RESN', 1);
}
// If we are editing an existing name, allow raw GEDCOM editing
if ($name_fact && (Auth::isAdmin() || $WT_TREE->getPreference('SHOW_GEDCOM_RECORD'))) {
echo '<br><br><a href="edit_interface.php?action=editrawfact&xref=', $xref, '&fact_id=', $name_fact->getFactId(), '&ged=', $WT_TREE->getNameUrl(), '">', I18N::translate('Edit raw GEDCOM'), '</a>';
}
echo '<p id="save-cancel">';
echo '<input type="submit" class="save" value="', I18N::translate('save'), '">';
if (preg_match('/^add_(child|spouse|parent|unlinked_indi)/', $nextaction)) {
echo '<input type="submit" class="save" value="', I18N::translate('go to new individual'), '" onclick="document.addchildform.goto.value=\'new\';">';
}
echo '<input type="button" class="cancel" value="', I18N::translate('close'), '" onclick="window.close();">';
echo '</p>';
echo '</form>';
$controller->addInlineJavascript('
SURNAME_TRADITION="' . $WT_TREE->getPreference('SURNAME_TRADITION') . '";
gender="' . $gender . '";
famtag="' . $famtag . '";
function trim(str) {
str=str.replace(/\\s\\s+/g, " ");
return str.replace(/(^\\s+)|(\\s+$)/g, "");
}
function lang_class(str) {
if (str.match(/[\\u0370-\\u03FF]/)) return "greek";
示例2:
}
if (Auth::isAdmin() && $action === 'update') {
echo '<tr><td class="descriptionbox wrap width25">';
echo GedcomTag::getLabel('CHAN'), '</td><td class="optionbox wrap">';
if ($NO_UPDATE_CHAN) {
echo '<input type="checkbox" checked name="preserve_last_changed">';
} else {
echo '<input type="checkbox" name="preserve_last_changed">';
}
echo I18N::translate('Keep the existing “last change” information'), '<br>';
echo '</td></tr>';
}
echo '</table>';
FunctionsEdit::printAddLayer('SOUR', 1);
FunctionsEdit::printAddLayer('NOTE', 1);
FunctionsEdit::printAddLayer('SHARED_NOTE', 1);
FunctionsEdit::printAddLayer('RESN', 1);
?>
<p id="save-cancel">
<input type="submit" class="save" value="<?php
echo I18N::translate('save');
?>
">
<input type="button" class="cancel" value="<?php
echo I18N::translate('close');
?>
" onclick="window.close();">
</p>
</form>
</div>
<?php