当前位置: 首页>>代码示例>>PHP>>正文


PHP Device::GetTags方法代码示例

本文整理汇总了PHP中Device::GetTags方法的典型用法代码示例。如果您正苦于以下问题:PHP Device::GetTags方法的具体用法?PHP Device::GetTags怎么用?PHP Device::GetTags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Device的用法示例。


在下文中一共展示了Device::GetTags方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: date

 // insert date formating later for regionalization settings
 $date = date("d M Y", strtotime($row["InstallDate"]));
 $Model = "";
 $Department = "";
 if ($row["TemplateID"] > 0) {
     $templ->TemplateID = $row["TemplateID"];
     $templ->GetTemplateByID();
     $Model = "<a href=\"device_templates.php?TemplateID={$templ->TemplateID}\" target=\"template\">{$templ->Model}</a>";
 }
 if ($row["Owner"] > 0) {
     $dept->DeptID = $row["Owner"];
     $dept->GetDeptByID();
     $Department = $dept->Name;
 }
 $dev->DeviceID = $row["DeviceID"];
 $tags = implode(",", $dev->GetTags());
 $body .= "\t\t<tr>\n\t\t\t\t<td><a href=\"dc_stats.php?dc={$row["DataCenterID"]}\" target=\"datacenter\">{$row["DataCenter"]}</a></td>\n\t\t\t\t<td><a href=\"cabnavigator.php?cabinetid={$row["CabinetID"]}\" target=\"cabinet\">{$row["Location"]}</a></td>\n\t\t\t\t<td>{$row["Position"]}</td>\n\t\t\t\t<td>{$row["Height"]}</td>\n\t\t\t\t<td><a href=\"devices.php?DeviceID={$dev->DeviceID}\" target=\"device\">{$row["Label"]}</a></td>\n\t\t\t\t<td>{$row["SerialNo"]}</td>\n\t\t\t\t<td>{$row["AssetTag"]}</td>\n\t\t\t\t<td><a href=\"search.php?key=dev&DeviceType={$row["DeviceType"]}&search\" target=\"search\">{$row["DeviceType"]}</a></td>\n\t\t\t\t<td>{$Model}</td>\n\t\t\t\t<td>{$tags}</td>\n\t\t\t\t<td>{$Department}</td>\n\t\t\t\t<td>{$date}</td>\n\t\t</tr>\n";
 if ($row["DeviceType"] == "Chassis") {
     // Find all of the children!
     $childList = $dev->GetDeviceChildren();
     foreach ($childList as $child) {
         $cdate = date("d M Y", strtotime($child->InstallDate));
         $cModel = "";
         $cDepartment = "";
         $ctags = implode(",", $child->GetTags());
         if ($child->TemplateID > 0) {
             $templ->TemplateID = $child->TemplateID;
             $templ->GetTemplateByID();
             $cModel = "<a href=\"device_templates.php?TemplateID={$templ->TemplateID}\" target=\"template\">{$templ->Model}</a>";
         }
         if ($child->Owner > 0) {
开发者ID:sengkoil,项目名称:openDCIM,代码行数:31,代码来源:search_export.php

示例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;
}
开发者ID:dc-admin,项目名称:openDCIM,代码行数:15,代码来源:report_asset_Excel-new.php


注:本文中的Device::GetTags方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。