/** * Vrací všechna data * * @return array */ public function getAllData() { $AllData = parent::getAllData(); foreach ($AllData as $ADkey => $AD) { unset($AllData[$ADkey]['deploy']); unset($AllData[$ADkey]['script_local']); unset($AllData[$ADkey]['script_remote']); unset($AllData[$ADkey]['script_type']); } return $AllData; }
/** * Vrací všechna data * * @return array */ public function getAllData() { $allData = parent::getAllData(); foreach ($allData as $adKey => $AD) { $params = $allData[$adKey]['check_command-params']; if (strlen($allData[$adKey]['check_command-remote'])) { if (!is_null($params)) { $allData[$adKey]['check_command'] .= '!' . $allData[$adKey]['check_command-remote'] . '!' . $params; } else { $allData[$adKey]['check_command'] .= '!' . $allData[$adKey]['check_command-remote']; } } else { if (strlen($params)) { $allData[$adKey]['check_command'] .= '!' . $params; } } unset($allData[$adKey]['check_command-remote']); unset($allData[$adKey]['check_command-params']); unset($allData[$adKey]['tcp_port']); unset($allData[$adKey]['configurator']); unset($allData[$adKey]['price']); } return $allData; }
/** * Vrací všechna data * * @return array Data hostu k uložení do konfiguráků */ public function getAllData() { $allData = parent::getAllData(); foreach ($allData as $hostID => $hostInfo) { if (!intval($hostInfo['register'])) { continue; } if (intval($hostInfo['user_id'])) { if (is_object($this->owner)) { if ($this->owner->getUserID() != $hostInfo['user_id']) { $this->owner->loadFromMySQL((int) $hostInfo['user_id']); } } else { $this->owner = new IEUser((int) $hostInfo['user_id']); } $hostOwnerLogin = $this->owner->getUserLogin(); /* Každý host musí mít jak kontakt login uživatele který ho má vidět */ if (is_array($hostInfo['contacts'])) { if (array_search($hostOwnerLogin, $hostInfo['contacts']) === false) { $allData[$hostID]['contacts'][] = $hostOwnerLogin; } } else { $allData[$hostID]['contacts'] = array($hostOwnerLogin); } } else { $this->addStatusMessage(_('Host bez vlastníka') . ': #' . $hostInfo[$this->myKeyColumn] . ': ' . $hostInfo[$this->nameColumn], 'warning'); } } return $allData; }
public function getAllData() { $allData = parent::getAllData(); foreach ($allData as $key => $dataRow) { $periods = $dataRow['periods']; if (count($periods)) { foreach ($periods as $timeName => $timeInterval) { $this->useKeywords[$timeName] = true; } $allData[$key] = array_merge($allData[$key], $periods); } unset($allData[$key]['periods']); } return $allData; }