本文整理汇总了PHP中Fisharebest\Webtrees\Functions\FunctionsEdit::addSimpleTag方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionsEdit::addSimpleTag方法的具体用法?PHP FunctionsEdit::addSimpleTag怎么用?PHP FunctionsEdit::addSimpleTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fisharebest\Webtrees\Functions\FunctionsEdit
的用法示例。
在下文中一共展示了FunctionsEdit::addSimpleTag方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hAddSimpleTag
/**
* {@inhericDoc}
* @see \MyArtJaub\Webtrees\Hook\HookInterfaces\CustomSimpleTagManagerInterface::hAddSimpleTag()
*/
public function hAddSimpleTag($context, $level)
{
switch ($context) {
case 'SOUR':
FunctionsEdit::addSimpleTag($level . ' _ACT');
break;
}
}
示例2: print_indi_form
//.........这里部分代码省略.........
}
break;
case 'add_spouse_to_individual_action':
$name_fields = $surname_tradition->newSpouseNames($indi_name, $gender) + $name_fields;
break;
case 'add_unlinked_indi_action':
case 'update':
if ($surname_tradition->hasSurnames()) {
$name_fields['NAME'] = '//';
}
break;
}
}
$bdm = '';
// used to copy '1 SOUR' to '2 SOUR' for BIRT DEAT MARR
echo '<div id="edit_interface-page">';
echo '<h4>', $controller->getPageTitle(), '</h4>';
FunctionsPrint::initializeCalendarPopup();
echo '<form method="post" name="addchildform" onsubmit="return checkform();">';
echo '<input type="hidden" name="ged" value="', $WT_TREE->getNameHtml(), '">';
echo '<input type="hidden" name="action" value="', $nextaction, '">';
echo '<input type="hidden" name="fact_id" value="', $name_fact_id, '">';
echo '<input type="hidden" name="xref" value="', $xref, '">';
echo '<input type="hidden" name="famtag" value="', $famtag, '">';
echo '<input type="hidden" name="gender" value="', $gender, '">';
echo '<input type="hidden" name="goto" value="">';
// set by javascript
echo Filter::getCsrf();
echo '<table class="facts_table">';
switch ($nextaction) {
case 'add_child_to_family_action':
case 'add_child_to_individual_action':
// When adding a new child, specify the pedigree
FunctionsEdit::addSimpleTag('0 PEDI');
break;
case 'update':
// When adding/editing a name, specify the type
FunctionsEdit::addSimpleTag('0 TYPE ' . $name_type, '', '', null, $person);
break;
}
// First - new/existing standard name fields
foreach ($name_fields as $tag => $value) {
if (substr_compare($tag, '_', 0, 1) !== 0) {
FunctionsEdit::addSimpleTag('0 ' . $tag . ' ' . $value);
}
}
// Second - new/existing advanced name fields
if ($surname_tradition->hasMarriedNames() || preg_match('/\\n2 _MARNM /', $namerec)) {
$adv_name_fields = array('_MARNM' => '');
} else {
$adv_name_fields = array();
}
if (preg_match_all('/(' . WT_REGEX_TAG . ')/', $WT_TREE->getPreference('ADVANCED_NAME_FACTS'), $match)) {
foreach ($match[1] as $tag) {
$adv_name_fields[$tag] = '';
}
}
foreach (array_keys($adv_name_fields) as $tag) {
// Edit existing tags, grouped together
if (preg_match_all('/2 ' . $tag . ' (.+)/', $namerec, $match)) {
foreach ($match[1] as $value) {
FunctionsEdit::addSimpleTag('2 ' . $tag . ' ' . $value, '', GedcomTag::getLabel('NAME:' . $tag, $person));
if ($tag === '_MARNM') {
preg_match_all('/\\/([^\\/]*)\\//', $value, $matches);
FunctionsEdit::addSimpleTag('2 _MARNM_SURN ' . implode(',', $matches[1]));
}
示例3:
}
continue;
}
// Output anything that isn’t part of a source reference
if (!empty($fact) && $fact !== 'CONC' && $fact !== 'CONT' && $fact !== 'DATA') {
FunctionsEdit::addSimpleTag($subLevel . ' ' . $fact . ' ' . $event);
}
}
}
if ($sourceSOUR !== '') {
// Get rid of all saved Source data
FunctionsEdit::addSimpleTag($sourceLevel . ' SOUR ' . $sourceSOUR);
FunctionsEdit::addSimpleTag($sourceLevel + 1 . ' PAGE ' . $sourcePAGE);
FunctionsEdit::addSimpleTag($sourceLevel + 2 . ' TEXT ' . $sourceTEXT);
FunctionsEdit::addSimpleTag($sourceLevel + 2 . ' DATE ' . $sourceDATE, '', GedcomTag::getLabel('DATA:DATE'));
FunctionsEdit::addSimpleTag($sourceLevel + 1 . ' QUAY ' . $sourceQUAY);
}
}
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);