mirror of
https://we.phorge.it/source/phorge.git
synced 2025-04-08 18:38:35 +02:00
Summary: I updated the wiki too - https://secure.phabricator.com/w/projects/pebkac/ - with what I am thinking right now. Rough plan here is - next diff: - implement editors and transactions - implement "web type" for contact source - /pebkac/item/new/ will be the entry point for this - implement "actions" on a contact - probably some "polish" on the scaffolding laid out here; like "create" permissions maybs - diffs after that: - implement "twitter" type for source - implement email reply handler stuff for item and source Probs a great time to blast huge holes in all this stuff. :D Test Plan: these pages load and arc lint doesn't complain Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran, chad Differential Revision: https://secure.phabricator.com/D7465
42 lines
892 B
PHP
42 lines
892 B
PHP
<?php
|
|
|
|
final class NuanceSourceViewController extends NuanceController {
|
|
|
|
private $sourceID;
|
|
|
|
public function setSourceID($source_id) {
|
|
$this->sourceID = $source_id;
|
|
return $this;
|
|
}
|
|
public function getSourceID() {
|
|
return $this->sourceID;
|
|
}
|
|
|
|
public function willProcessRequest(array $data) {
|
|
$this->setSourceID($data['id']);
|
|
}
|
|
|
|
public function processRequest() {
|
|
$request = $this->getRequest();
|
|
$user = $request->getUser();
|
|
|
|
$source_id = $this->getSourceID();
|
|
$source = id(new NuanceSourceQuery())
|
|
->setViewer($user)
|
|
->withIDs(array($source_id))
|
|
->executeOne();
|
|
|
|
if (!$source) {
|
|
return new Aphront404Response();
|
|
}
|
|
|
|
$crumbs = $this->buildApplicationCrumbs();
|
|
$title = 'TODO';
|
|
|
|
return $this->buildApplicationPage(
|
|
$crumbs,
|
|
array(
|
|
'title' => $title,
|
|
'device' => true));
|
|
}
|
|
}
|