3 final class ReleephBranchPreviewView
extends AphrontFormControl
{
5 private $statics = array();
6 private $dynamics = array();
8 public function addControl($param_name, AphrontFormControl
$control) {
9 $celerity_id = celerity_generate_unique_node_id();
10 $control->setID($celerity_id);
11 $this->dynamics
[$param_name] = $celerity_id;
15 public function addStatic($param_name, $value) {
16 $this->statics
[$param_name] = $value;
20 protected function getCustomControlClass() {
21 require_celerity_resource('releeph-preview-branch');
22 return 'releeph-preview-branch';
25 protected function renderInput() {
26 static $required_params = array(
33 $all_params = array_merge($this->statics
, $this->dynamics
);
34 foreach ($required_params as $param_name) {
35 if (idx($all_params, $param_name) === null) {
38 "'%s' is not set as either a static or dynamic!",
43 $output_id = celerity_generate_unique_node_id();
45 Javelin
::initBehavior('releeph-preview-branch', array(
46 'uri' => '/releeph/branch/preview/',
47 'outputID' => $output_id,
49 'static' => $this->statics
,
50 'dynamic' => $this->dynamics
,