本文整理汇总了PHP中Cabinet::ListCabinets方法的典型用法代码示例。如果您正苦于以下问题:PHP Cabinet::ListCabinets方法的具体用法?PHP Cabinet::ListCabinets怎么用?PHP Cabinet::ListCabinets使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cabinet
的用法示例。
在下文中一共展示了Cabinet::ListCabinets方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
<?php
} elseif (isset($_GET["cab"])) {
if ($cab->CabinetID > 0) {
$cab->GetCabinet();
} else {
$cab->CabinetID = null;
$cab->DataCenterID = null;
$cab->Location = null;
$cab->CabinetHeight = null;
$cab->Model = null;
$cab->MaxKW = null;
$cab->MaxWeight = null;
$cab->InstallationDate = date('m/d/Y');
}
$deptList = $dept->GetDepartmentList();
$cabList = $cab->ListCabinets();
?>
<div class='page installer'>
<div id="sidebar">
<ul>
<a href="?dept&preflight-ok"><li>Departments</li></a>
<a href="?dc&preflight-ok"><li>Data Centers</li></a>
<a><li class="active">Cabinets</li></a>
<?php
if (isset($complete)) {
echo '<a href="?complete&preflight-ok"><li>Complete</li></a>';
}
?>
</ul>
</div>
示例2: buildNavTreeArray
function buildNavTreeArray()
{
$con = new Container();
$cabs = Cabinet::ListCabinets();
$menu = array();
function processcontainer($container, $cabs)
{
$menu = array($container);
foreach ($container->GetChildren() as $child) {
if (get_class($child) == 'Container') {
$menu[] = processcontainer($child, $cabs);
} elseif (get_class($child) == 'DataCenter') {
$menu[] = processdatacenter($child, $cabs);
}
}
return $menu;
}
function processdatacenter($dc, $cabs)
{
$menu = array($dc);
foreach ($dc->GetChildren() as $child) {
if (get_class($child) == 'Zone') {
$menu[] = processzone($child, $cabs);
} elseif (get_class($child) == 'CabRow') {
$menu[] = processcabrow($child, $cabs);
} else {
$menu[] = processcab($child, $cabs);
}
}
return $menu;
}
function processzone($zone, $cabs)
{
$menu = array($zone);
foreach ($zone->GetChildren() as $child) {
if (get_class($child) == 'CabRow') {
$menu[] = processcabrow($child, $cabs);
} else {
$menu[] = processcab($child, $cabs);
}
}
return $menu;
}
function processcabrow($row, $cabs)
{
$menu = array($row);
foreach ($cabs as $cab) {
if ($cab->CabRowID == $row->CabRowID) {
$menu[] = processcab($cab, $cabs);
}
}
return $menu;
}
function processcab($cab, $cabs)
{
return $cab;
}
foreach ($con->GetChildren() as $child) {
if (get_class($child) == 'Container') {
$menu[] = processcontainer($child, $cabs);
} elseif (get_class($child) == 'DataCenter') {
$menu[] = processdatacenter($child, $cabs);
}
}
return $menu;
}