public function handlePanelRequest(AphrontRequest $request, PhabricatorController $controller)
 {
     $viewer = $request->getViewer();
     $application = $this->getApplication();
     $path = $request->getURIData('path');
     if (strlen($path)) {
         return new Aphront404Response();
     }
     $uri = $request->getRequestURI();
     $uri->setQueryParams(array());
     $new = $request->getStr('new');
     $edit = $request->getInt('edit');
     $delete = $request->getInt('delete');
     if ($new) {
         return $this->returnNewAddressResponse($request, $uri, $application);
     }
     if ($edit) {
         return $this->returnEditAddressResponse($request, $uri, $edit);
     }
     if ($delete) {
         return $this->returnDeleteAddressResponse($request, $uri, $delete);
     }
     $table = $this->buildEmailTable($is_edit = true, $request->getInt('id'));
     $form = id(new AphrontFormView())->setUser($viewer);
     $crumbs = $controller->buildPanelCrumbs($this);
     $crumbs->addTextCrumb(pht('Edit Application Emails'));
     $crumbs->setBorder(true);
     $header = id(new PHUIHeaderView())->setHeader(pht('Edit Application Emails: %s', $application->getName()))->setSubheader($application->getAppEmailBlurb())->setHeaderIcon('fa-pencil');
     $icon = id(new PHUIIconView())->setIcon('fa-plus');
     $button = new PHUIButtonView();
     $button->setText(pht('Add New Address'));
     $button->setTag('a');
     $button->setHref($uri->alter('new', 'true'));
     $button->setIcon($icon);
     $button->addSigil('workflow');
     $header->addActionLink($button);
     $object_box = id(new PHUIObjectBoxView())->setHeaderText(pht('Emails'))->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)->setTable($table);
     $title = $application->getName();
     $view = id(new PHUITwoColumnView())->setHeader($header)->setFooter($object_box);
     return $controller->buildPanelPage($this, $title, $crumbs, $view);
 }