本文整理汇总了PHP中Cabinet::GetTags方法的典型用法代码示例。如果您正苦于以下问题:PHP Cabinet::GetTags方法的具体用法?PHP Cabinet::GetTags怎么用?PHP Cabinet::GetTags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cabinet
的用法示例。
在下文中一共展示了Cabinet::GetTags方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
$cab->Location = null;
$cab->ZoneID = isset($_GET['zoneid']) ? intval($_GET['zoneid']) : null;
$cab->CabRowID = isset($_GET['cabrowid']) ? intval($_GET['cabrowid']) : null;
$cab->CabinetHeight = null;
$cab->Model = null;
$cab->Keylock = null;
$cab->MaxKW = null;
$cab->MaxWeight = null;
$cab->InstallationDate = date('m/d/Y');
}
$deptList = $dept->GetDepartmentList();
$cabList = $cab->ListCabinets();
$sensorList = SensorTemplate::getTemplates();
if ($cab->CabinetID > 0) {
// Get any tags associated with this device
$tags = $cab->GetTags();
if (count($tags > 0)) {
// We have some tags so build the javascript elements we need to create the tags themselves
$taginsert = "\t\ttags: {items: " . json_encode($tags) . "},\n";
}
}
?>
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Facilities Cabinet Maintenance</title>
<link rel="stylesheet" href="css/inventory.php" type="text/css">
<link rel="stylesheet" href="css/jquery-ui.css" type="text/css">
示例2: getTagsString
/**
* Merge the tags of a Device or Cabinet into one string separated by ', '
*
* @param Device|Cabinet $obj
* @return string
*/
function getTagsString($obj, $emptyVal = null)
{
$tagNames = $emptyVal;
$tag_list = $obj->GetTags();
if (count($tag_list) > 0) {
$tagNames = implode(', ', $tag_list);
}
return $tagNames;
}