本文整理匯總了PHP中Cabinet::SearchByCustomTag方法的典型用法代碼示例。如果您正苦於以下問題:PHP Cabinet::SearchByCustomTag方法的具體用法?PHP Cabinet::SearchByCustomTag怎麽用?PHP Cabinet::SearchByCustomTag使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Cabinet
的用法示例。
在下文中一共展示了Cabinet::SearchByCustomTag方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: count
$esx->Owner = $dept->DeptID;
$vmList = $esx->GetVMListbyOwner();
$cab->AssignedTo = $dept->DeptID;
$cabList = $cab->Search(true);
//PDUs have no ownership information so don't search them
$resultcount = count($devList) + count($cabList) + count($vmList);
$title = __("Owner search results for") . " "{$searchTerm}"";
} elseif ($searchKey == 'asset') {
$dev->AssetTag = $searchTerm;
$devList = $dev->SearchDevicebyAssetTag();
$resultcount = count($devList);
$title = __("Asset tag search results for") . " "{$searchTerm}"";
} elseif ($searchKey == "ctag") {
// TODO: this could be enhanced to allow searching for a specific custom attribute
$devList = $dev->SearchByCustomTag($searchTerm);
$cabList = $cab->SearchByCustomTag($searchTerm);
$resultcount = count($devList) + count($cabList);
$title = __("Custom tag search results for") . " "{$searchTerm}"";
} elseif ($searchKey == "cattr") {
$devList = $dev->SearchByCustomAttribute($searchTerm);
$resultcount = count($devList);
$title = __("Custom attribute search results for") . " "{$searchTerm}"";
} elseif ($searchKey == "notes") {
$dev->Notes = $searchTerm;
$devList = $dev->LooseSearch(true);
$cab->Notes = $searchTerm;
$cabList = $cab->LooseSearch(true);
// DevicePorts and PowerPorts use the same structures and functions so
// we're just looping the search to not repeat code
foreach (array('DevicePorts', 'PowerPorts') as $pt) {
$p = new $pt();