本文整理汇总了PHP中thesaurus::get_parent方法的典型用法代码示例。如果您正苦于以下问题:PHP thesaurus::get_parent方法的具体用法?PHP thesaurus::get_parent怎么用?PHP thesaurus::get_parent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类thesaurus
的用法示例。
在下文中一共展示了thesaurus::get_parent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parent_num
function parent_num($descriptorID)
{
$tempArray = thesaurus::get_parent($descriptorID);
if ($tempArray) {
return count($tempArray);
} else {
return FALSE;
}
}
示例2: record
function record($id, $termType)
{
$uses = "";
$term = thesaurus::get_name($id);
$uses = extract_pattern($term, "/\\(BS[: ](?<use>.*)\\)/");
$recordArray = array();
$record = new simpleXmlElement("<record />");
// check if term already exists
// define array for record creation
$recordArray['input.name'] = "Thesaurus Redaktion";
$recordArray['input.date'] = date("Y-m-d", time());
$recordArray['input.time'] = date("h:i:s", time());
$recordArray['term.type'] = $termType;
$recordArray['term.status'] = thesaurus::get_status_name(thesaurus::get_status($id));
$recordArray['term'] = $term;
$recordArray['notes'] = thesaurus::get_comment($id);
$recordArray['broader_term'] = thesaurus::get_parent($id);
// $recordArray['narrower_term'] = thesaurus::get_child($id);
$recordArray['related_term'] = thesaurus::get_assoc($id);
$recordArray['used_for'] = $uses;
xml_insert($record->record, create_record($recordArray, $termType));
return $record;
}
示例3: hyrarchic_links
function hyrarchic_links($id)
{
$tempArray = thesaurus::get_parent($id);
if ($tempArray) {
echo "<form method='get' action='index.php' name='ob'>";
echo "<fieldset>";
echo "<legend>Oberbegriffe</legend>";
$x = 0;
$listArray = array();
foreach ($tempArray as $entry) {
$listArray[$x++] = thesaurus::get_descriptor($entry);
}
echo_selection($listArray, "id", "", 3, "upper-field");
// display action line
action::display($id, 1);
echo "</fieldset>";
echo "</form>";
}
}