Differential D20154 Diff 48161 src/applications/multimeter/controller/MultimeterSampleController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/multimeter/controller/MultimeterSampleController.php
Show First 20 Lines • Show All 296 Lines • ▼ Show 20 Lines | final class MultimeterSampleController extends MultimeterController { | ||||
private function getGroupURI(array $group, $wipe = false) { | private function getGroupURI(array $group, $wipe = false) { | ||||
unset($group['type']); | unset($group['type']); | ||||
$uri = clone $this->getRequest()->getRequestURI(); | $uri = clone $this->getRequest()->getRequestURI(); | ||||
$group = implode('.', $group); | $group = implode('.', $group); | ||||
if (!strlen($group)) { | if (!strlen($group)) { | ||||
$group = null; | $group = null; | ||||
} | } | ||||
$uri->setQueryParam('group', $group); | $uri->replaceQueryParam('group', $group); | ||||
if ($wipe) { | if ($wipe) { | ||||
foreach ($this->getColumnMap() as $key => $column) { | foreach ($this->getColumnMap() as $key => $column) { | ||||
$uri->setQueryParam($key, null); | $uri->removeQueryParam($key); | ||||
} | } | ||||
} | } | ||||
return $uri; | return $uri; | ||||
} | } | ||||
private function renderSelectionLink($key, $value, $link_text) { | private function renderSelectionLink($key, $value, $link_text) { | ||||
$value = (array)$value; | $value = (array)$value; | ||||
$uri = clone $this->getRequest()->getRequestURI(); | $uri = clone $this->getRequest()->getRequestURI(); | ||||
$uri->setQueryParam($key, implode(',', $value)); | $uri->replaceQueryParam($key, implode(',', $value)); | ||||
return phutil_tag( | return phutil_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'href' => $uri, | 'href' => $uri, | ||||
), | ), | ||||
$link_text); | $link_text); | ||||
} | } | ||||
Show All 21 Lines |