1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 17:52:43 +01:00
phorge-phorge/src/applications/nuance/source/NuancePhabricatorFormSourceDefinition.php
epriestley 837e6b5ca7 Slightly modernize NuanceSource
Summary:
Ref T8434. Minor cleanup/modernization. I made type selection modal (like Herald, Auth, etc) so we can render the form on the next screen based on the type.

{F472519}

Test Plan: Created a new source, edited an existing source.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8434

Differential Revision: https://secure.phabricator.com/D13161
2015-06-05 10:44:02 -07:00

45 lines
1,023 B
PHP

<?php
final class NuancePhabricatorFormSourceDefinition
extends NuanceSourceDefinition {
public function getName() {
return pht('Phabricator Form');
}
public function getSourceDescription() {
return pht('Create a web form that submits into a Nuance queue.');
}
public function getSourceTypeConstant() {
return 'phabricator-form';
}
public function updateItems() {
return null;
}
protected function augmentEditForm(
AphrontFormView $form,
PhabricatorApplicationTransactionValidationException $ex = null) {
/* TODO - add a box to allow for custom fields to be defined here, so that
* these NuanceSource objects made from this definition can be used to
* capture arbitrary data */
return $form;
}
protected function buildTransactions(AphrontRequest $request) {
$transactions = parent::buildTransactions($request);
// TODO -- as above
return $transactions;
}
public function renderView() {}
public function renderListView() {}
}