<?php $htmls = $texts = [] ?>
<?php foreach ($serverPartCellDatas['types'] as $type): ?>
    <?php $htmls[$type] = [] ?>
    <?php $texts[$type] = []; ?>
    <?php foreach ($serverPartCellDatas['entities'][$type] as $entities): ?>
        <?php foreach ($entities as $entity): ?>
            <?php $serverPartCellDatas['entity'] = $entity ?>
            <?php $htmls[$type][] = $serverPartCellDatas['service']->getHelper()->getFieldView($type, $entity->getPK(), $serverPartCellDatas) ?>
            <?php $texts[$type][] = $serverPartCellDatas['service']->getHelper()->getFieldView($type, $entity->getPK(), $serverPartCellDatas, ['return' => 'onlyText']) ?>
        <?php endforeach ?>
    <?php endforeach ?>
<?php endforeach ?>
<?php $view_htmls = [
    $serverPartCellDatas['service']->getHelper()->getFieldView('SERVER', "", $serverPartCellDatas),
    $serverPartCellDatas['serverEntity']->getIP(),
    $serverPartCellDatas['serverEntity']->getSwitch(),
    $serverPartCellDatas['serverEntity']->getOS()
] ?>
<?php foreach ($htmls as $type => $datas): ?><?php $view_htmls[] = implode(",", $datas) ?><?php endforeach ?>
<?php $view_texts = [
    $serverPartCellDatas['serverEntity']->getCode(),
    $serverPartCellDatas['serverEntity']->getIP(),
    $serverPartCellDatas['serverEntity']->getSwitch(),
    $serverPartCellDatas['serverEntity']->getOS()
] ?>
<?php foreach ($texts as $type => $datas): ?><?php $view_texts[] = implode(',', $datas) ?><?php endforeach ?>
<?php $text = implode("/", $view_texts) ?>
<div class="text-nowrap" style="font-size: 0.9em;">
    <span class="serverparts" style="cursor:pointer;" onClick="copyServerPartToClipboard('<?= $text ?>')" text-data="<?= $text ?>">📋</span>
    <?= implode("/", $view_htmls) ?>
</div>