Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/editor/DiffusionURIEditEngine.php
Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | protected function buildCustomEditFields($object) { | ||||
} | } | ||||
return array( | return array( | ||||
id(new PhabricatorHandlesEditField()) | id(new PhabricatorHandlesEditField()) | ||||
->setKey('repository') | ->setKey('repository') | ||||
->setAliases(array('repositoryPHID')) | ->setAliases(array('repositoryPHID')) | ||||
->setLabel(pht('Repository')) | ->setLabel(pht('Repository')) | ||||
->setIsRequired(true) | ->setIsRequired(true) | ||||
->setIsConduitOnly(true) | ->setIsFormField(false) | ||||
->setTransactionType( | ->setTransactionType( | ||||
PhabricatorRepositoryURITransaction::TYPE_REPOSITORY) | PhabricatorRepositoryURITransaction::TYPE_REPOSITORY) | ||||
->setDescription(pht('The repository this URI is associated with.')) | ->setDescription(pht('The repository this URI is associated with.')) | ||||
->setConduitDescription( | ->setConduitDescription( | ||||
pht( | pht( | ||||
'Create a URI in a given repository. This transaction type '. | 'Create a URI in a given repository. This transaction type '. | ||||
'must be present when creating a new URI and must not be '. | 'must be present when creating a new URI and must not be '. | ||||
'present when editing an existing URI.')) | 'present when editing an existing URI.')) | ||||
Show All 28 Lines | return array( | ||||
->setConduitDescription(pht('Change display behavior.')) | ->setConduitDescription(pht('Change display behavior.')) | ||||
->setConduitTypeDescription(pht('New display behavior.')) | ->setConduitTypeDescription(pht('New display behavior.')) | ||||
->setValue($object->getDisplayType()) | ->setValue($object->getDisplayType()) | ||||
->setOptions($object->getAvailableDisplayTypeOptions()), | ->setOptions($object->getAvailableDisplayTypeOptions()), | ||||
id(new PhabricatorHandlesEditField()) | id(new PhabricatorHandlesEditField()) | ||||
->setKey('credential') | ->setKey('credential') | ||||
->setAliases(array('credentialPHID')) | ->setAliases(array('credentialPHID')) | ||||
->setLabel(pht('Credential')) | ->setLabel(pht('Credential')) | ||||
->setIsConduitOnly(true) | ->setIsFormField(false) | ||||
->setTransactionType( | ->setTransactionType( | ||||
PhabricatorRepositoryURITransaction::TYPE_CREDENTIAL) | PhabricatorRepositoryURITransaction::TYPE_CREDENTIAL) | ||||
->setDescription( | ->setDescription( | ||||
pht('The credential to use when interacting with this URI.')) | pht('The credential to use when interacting with this URI.')) | ||||
->setConduitDescription(pht('Change the credential for this URI.')) | ->setConduitDescription(pht('Change the credential for this URI.')) | ||||
->setConduitTypeDescription(pht('New credential PHID, or null.')) | ->setConduitTypeDescription(pht('New credential PHID, or null.')) | ||||
->setSingleValue($object->getCredentialPHID()), | ->setSingleValue($object->getCredentialPHID()), | ||||
id(new PhabricatorBoolEditField()) | id(new PhabricatorBoolEditField()) | ||||
->setKey('disable') | ->setKey('disable') | ||||
->setLabel(pht('Disabled')) | ->setLabel(pht('Disabled')) | ||||
->setIsConduitOnly(true) | ->setIsFormField(false) | ||||
->setTransactionType(PhabricatorRepositoryURITransaction::TYPE_DISABLE) | ->setTransactionType(PhabricatorRepositoryURITransaction::TYPE_DISABLE) | ||||
->setDescription(pht('Active status of the URI.')) | ->setDescription(pht('Active status of the URI.')) | ||||
->setConduitDescription(pht('Disable or activate the URI.')) | ->setConduitDescription(pht('Disable or activate the URI.')) | ||||
->setConduitTypeDescription(pht('True to disable the URI.')) | ->setConduitTypeDescription(pht('True to disable the URI.')) | ||||
->setOptions(pht('Enable'), pht('Disable')) | ->setOptions(pht('Enable'), pht('Disable')) | ||||
->setValue($object->getIsDisabled()), | ->setValue($object->getIsDisabled()), | ||||
); | ); | ||||
} | } | ||||
} | } |