本文整理匯總了PHP中eZURLAliasML::findUniqueText方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZURLAliasML::findUniqueText方法的具體用法?PHP eZURLAliasML::findUniqueText怎麽用?PHP eZURLAliasML::findUniqueText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZURLAliasML
的用法示例。
在下文中一共展示了eZURLAliasML::findUniqueText方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testFindUniqueText_ReservedWords
public function testFindUniqueText_ReservedWords()
{
// Make sure a text with the same name as the "content" module will be
// changed to "content2"
$uniqueText = eZURLAliasML::findUniqueText(0, "content", "");
self::assertEquals("content2", $uniqueText);
}
示例2: adjustPathElement
function adjustPathElement($element, $useParentFromNodeObject = false)
{
$nodeID = (int) $this->attribute('node_id');
$parentNodeID = (int) $this->attribute('parent_node_id');
$action = "eznode:" . $nodeID;
$elements = eZURLAliasML::fetchByAction('eznode', $nodeID);
if (count($elements) > 0 and !$useParentFromNodeObject) {
$parentElementID = (int) $elements[0]->attribute('parent');
return eZURLAliasML::findUniqueText($parentElementID, $element, $action);
} else {
$parentElements = eZURLAliasML::fetchByAction('eznode', $parentNodeID);
if (count($parentElements) > 0 && $parentElements[0]->attribute('text') != '') {
// Pick one of the parents and get the ID
$parentElementID = (int) $parentElements[0]->attribute('id');
return eZURLAliasML::findUniqueText($parentElementID, $element, $action);
}
}
return eZURLAliasML::findUniqueText(0, $element, $action);
}