diff --git a/src/view/layout/AphrontSideNavFilterView.php b/src/view/layout/AphrontSideNavFilterView.php index c7f247599a..de662f2d35 100644 --- a/src/view/layout/AphrontSideNavFilterView.php +++ b/src/view/layout/AphrontSideNavFilterView.php @@ -53,9 +53,22 @@ final class AphrontSideNavFilterView extends AphrontView { return $this; } - public function addFilter($key, $name, $uri = null, $relative = false) { + public function addFilter( + $key, + $name, + $uri = null, + $relative = false, + $class = null) { + $this->items[] = array( - 'filter', $key, $name, 'uri' => $uri, 'relative' => $relative); + 'filter', + $key, + $name, + 'uri' => $uri, + 'relative' => $relative, + 'class' => $class, + ); + return $this; } @@ -134,6 +147,8 @@ final class AphrontSideNavFilterView extends AphrontView { ? 'aphront-side-nav-selected' : null; + $class = trim($class.' '.idx($item, 'class', '')); + if (empty($item['uri'])) { $href = clone $this->baseURI; $href->setPath($href->getPath().$key.'/');