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


PHP FunctionsEdit::addSimpleTag方法代码示例

本文整理汇总了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;
     }
 }
开发者ID:jon48,项目名称:webtrees-lib,代码行数:12,代码来源:CertificatesModule.php

示例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]));
                }
开发者ID:jflash,项目名称:webtrees,代码行数:67,代码来源:edit_interface.php

示例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);
开发者ID:pal-saugstad,项目名称:webtrees,代码行数:31,代码来源:addmedia.php


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