Page MenuHomeIsabelle/Phabricator
Diviner Phabricator Tech Docs PhabricatorApplicationTransactionEditor

abstract class PhabricatorApplicationTransactionEditor
Phabricator Technical Documentation (Transactions)

Publishing and Managing State

After applying changes, the Editor queues a worker to publish mail, feed, and notifications, and to perform other background work like updating search indexes. This allows it to do this work without impacting performance for users.

When work is moved to the daemons, the Editor state is serialized by getWorkerState(), then reloaded in a daemon process by loadWorkerState(). This is fragile.

State is not persisted into the daemons by default, because we can not send arbitrary objects into the queue. This means the default behavior of any state properties is to reset to their defaults without warning prior to publishing.

The easiest way to avoid this is to keep Editors stateless: the overwhelming majority of Editors can be written statelessly. If you need to maintain state, you can either:

This architecture isn't ideal, and we may eventually split this class into "Editor" and "Publisher" parts to make it more robust. See T6367 for some discussion and context.

Tasks

Sending Mail

Publishing Feed Stories

Search Index

Integration with Files

Managing Workers

  • protected function willPublish($object, $xactions) — Load any object state which is required to publish transactions.
  • final private function getWorkerState() — Convert the editor state to a serializable dictionary which can be passed to a worker.
  • protected function getCustomWorkerState() — Hook; return custom properties which need to be passed to workers.
  • protected function getCustomWorkerStateEncoding() — Hook; return storage encoding for custom properties which need to be passed to workers.
  • final public function loadWorkerState($state) — Load editor state using a dictionary emitted by @{method:getWorkerState}.
  • protected function loadCustomWorkerState($state) — Hook; set custom properties on the editor from data emitted by @{method:getCustomWorkerState}.
  • private function getAutomaticStateProperties() — Get a list of object properties which should be automatically sent to workers in the state data.
  • final private function encodeStateForStorage($state, $encodings) — Apply encodings prior to storage.
  • final private function decodeStateFromStorage($state, $encodings) — Undo storage encoding applied when storing state.

Other Methods

customfield

Methods

final public function setActor($actor)
Inherited

This method is not documented.
Parameters
PhabricatorUser$actor
Return
wild

final public function getActor()
Inherited

This method is not documented.
Return
wild

final public function requireActor()
Inherited

This method is not documented.
Return
wild

final public function setExcludeMailRecipientPHIDs($phids)
Inherited

This method is not documented.
Parameters
$phids
Return
wild

final protected function getExcludeMailRecipientPHIDs()
Inherited

This method is not documented.
Return
wild

abstract public function getEditorApplicationClass()

Get the class name for the application this editor is a part of.

Uninstalling the application will disable the editor.

Return
stringEditor's application class name.

abstract public function getEditorObjectsDescription()

Get a description of the objects this editor edits, like "Differential Revisions".

Return
stringHuman readable description of edited objects.

public function setActingAsPHID($acting_as_phid)

This method is not documented.
Parameters
$acting_as_phid
Return
wild

public function getActingAsPHID()

This method is not documented.
Return
wild

public function setContinueOnNoEffect($continue)

When the editor tries to apply transactions that have no effect, should it raise an exception (default) or drop them and continue?

Generally, you will set this flag for edits coming from "Edit" interfaces, and leave it cleared for edits coming from "Comment" interfaces, so the user will get a useful error if they try to submit a comment that does nothing (e.g., empty comment with a status change that has already been performed by another user).

Parameters
bool$continueTrue to drop transactions without effect and continue.
Return
this

public function getContinueOnNoEffect()

This method is not documented.
Return
wild

public function setContinueOnMissingFields($continue_on_missing_fields)

When the editor tries to apply transactions which don't populate all of an object's required fields, should it raise an exception (default) or drop them and continue?

For example, if a user adds a new required custom field (like "Severity") to a task, all existing tasks won't have it populated. When users manually edit existing tasks, it's usually desirable to have them provide a severity. However, other operations (like batch editing just the owner of a task) will fail by default.

By setting this flag for edit operations which apply to specific fields (like the priority, batch, and merge editors in Maniphest), these operations can continue to function even if an object is outdated.

Parameters
bool$continue_on_missing_fieldsTrue to continue when transactions don't completely satisfy all required fields.
Return
this

public function getContinueOnMissingFields()

This method is not documented.
Return
wild

public function setParentMessageID($parent_message_id)

Not strictly necessary, but reply handlers ideally set this value to make email threading work better.

Parameters
$parent_message_id
Return
wild

public function getParentMessageID()

This method is not documented.
Return
wild

public function getIsNewObject()

This method is not documented.
Return
wild

public function getMentionedPHIDs()

This method is not documented.
Return
wild

public function setIsPreview($is_preview)

This method is not documented.
Parameters
$is_preview
Return
wild

public function getIsPreview()

This method is not documented.
Return
wild

public function setIsSilent($silent)

This method is not documented.
Parameters
$silent
Return
wild

public function getIsSilent()

This method is not documented.
Return
wild

public function getMustEncrypt()

This method is not documented.
Return
wild

public function getHeraldRuleMonograms()

This method is not documented.
Return
wild

public function setIsInverseEdgeEditor($is_inverse_edge_editor)

This method is not documented.
Parameters
$is_inverse_edge_editor
Return
wild

public function getIsInverseEdgeEditor()

This method is not documented.
Return
wild

public function setIsHeraldEditor($is_herald_editor)

This method is not documented.
Parameters
$is_herald_editor
Return
wild

public function getIsHeraldEditor()

This method is not documented.
Return
wild

public function addUnmentionablePHIDs($phids)

This method is not documented.
Parameters
array$phids
Return
wild

private function getUnmentionablePHIDMap()

This method is not documented.
Return
wild

protected function shouldEnableMentions($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

public function setApplicationEmail($email)

This method is not documented.
Parameters
PhabricatorMetaMTAApplicationEmail$email
Return
wild

public function getApplicationEmail()

This method is not documented.
Return
wild

public function setRaiseWarnings($raise_warnings)

This method is not documented.
Parameters
$raise_warnings
Return
wild

public function getRaiseWarnings()

This method is not documented.
Return
wild

public function setShouldRequireMFA($should_require_mfa)

This method is not documented.
Parameters
$should_require_mfa
Return
wild

public function getShouldRequireMFA()

This method is not documented.
Return
wild

public function getTransactionTypesForObject($object)

This method is not documented.
Parameters
$object
Return
wild

public function getTransactionTypes()

This method is not documented.
Return
wild

private function adjustTransactionValues($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

private function getTransactionOldValue($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

private function getTransactionNewValue($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

protected function getCustomTransactionOldValue($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

protected function getCustomTransactionNewValue($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

protected function transactionHasEffect($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

protected function shouldApplyInitialEffects($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function applyInitialEffects($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

private function applyInternalEffects($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

private function applyExternalEffects($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

protected function applyCustomInternalTransaction($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

protected function applyCustomExternalTransaction($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

protected function applyBuiltinInternalTransaction($object, $xaction)

PhabricatorTransactions provides many built-in transactions which should not require much - if any - code in specific applications.

This method is a hook for the exceedingly-rare cases where you may need to do additional work for built-in transactions. Developers should extend this method, making sure to return the parent implementation regardless of handling any transactions.

See also applyBuiltinExternalTransaction().

Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

protected function applyBuiltinExternalTransaction($object, $xaction)

Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

protected function populateTransaction($object, $xaction)

Fill in a transaction's common values, like author and content source.

Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

protected function didApplyInternalEffects($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function applyFinalEffects($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

final protected function didCommitTransactions($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

public function setContentSource($content_source)

This method is not documented.
Parameters
PhabricatorContentSource$content_source
Return
wild

public function setContentSourceFromRequest($request)

This method is not documented.
Parameters
AphrontRequest$request
Return
wild

public function getContentSource()

This method is not documented.
Return
wild

public function setRequest($request)

This method is not documented.
Parameters
AphrontRequest$request
Return
wild

public function getRequest()

This method is not documented.
Return
wild

public function setCancelURI($cancel_uri)

This method is not documented.
Parameters
$cancel_uri
Return
wild

public function getCancelURI()

This method is not documented.
Return
wild

protected function getTransactionGroupID()

This method is not documented.
Return
wild

final public function applyTransactions($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

final private function queuePublishing()

This method is not documented.
Return
wild

protected function didCatchDuplicateKeyException($object, $xactions, $ex)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Exception$ex
Return
wild

public function publishTransactions($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function didApplyTransactions($object, $xactions)

This method is not documented.
Parameters
$object
array$xactions
Return
wild

private function loadHandles($xactions)

This method is not documented.
Parameters
array$xactions
Return
wild

private function loadSubscribers($object)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
Return
wild

private function validateEditParameters($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

private function applyCapabilityChecks($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

private function getLegacyRequiredCapabilities($xaction)

This method is not documented.
Parameters
PhabricatorApplicationTransaction$xaction
Return
wild

private function getLegacyRequiredEdgeCapabilities($xaction)

This method is not documented.
Parameters
PhabricatorApplicationTransaction$xaction
Return
wild

private function buildSubscribeTransaction($object, $xactions, $changes)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
array$changes
Return
wild

protected function mergeTransactions($u, $v)

This method is not documented.
Parameters
PhabricatorApplicationTransaction$u
PhabricatorApplicationTransaction$v
Return
wild

protected function expandTransactions($object, $xactions)

Optionally expand transactions which imply other effects. For example, resigning from a revision in Differential implies removing yourself as a reviewer.

Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function expandTransaction($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

public function getExpandedSupportTransactions($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

private function expandSupportTransactions($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

private function getRemarkupChanges($xactions)

This method is not documented.
Parameters
array$xactions
Return
wild

private function getRemarkupChangesFromTransaction($transaction)

This method is not documented.
Parameters
PhabricatorApplicationTransaction$transaction
Return
wild

private function expandRemarkupBlockTransactions($object, $xactions, $changes, $engine)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
array$changes
PhutilMarkupEngine$engine
Return
wild

protected function expandCustomRemarkupBlockTransactions($object, $xactions, $changes, $engine)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
array$changes
PhutilMarkupEngine$engine
Return
wild

private function combineTransactions($xactions)

Attempt to combine similar transactions into a smaller number of total transactions. For example, two transactions which edit the title of an object can be merged into a single edit.

Parameters
array$xactions
Return
wild

public function mergePHIDOrEdgeTransactions($u, $v)

This method is not documented.
Parameters
PhabricatorApplicationTransaction$u
PhabricatorApplicationTransaction$v
Return
wild

protected function mergeEdgeData($type, $u, $v)

This method is not documented.
Parameters
$type
array$u
array$v
Return
wild

protected function getPHIDTransactionNewValue($xaction, $old)

This method is not documented.
Parameters
PhabricatorApplicationTransaction$xaction
$old
Return
wild

public function getPHIDList($old, $new)

This method is not documented.
Parameters
array$old
array$new
Return
wild

protected function getEdgeTransactionNewValue($xaction)

This method is not documented.
Parameters
PhabricatorApplicationTransaction$xaction
Return
wild

private function checkEdgeList($list, $edge_type)

This method is not documented.
Parameters
$list
$edge_type
Return
wild

private function normalizeEdgeTransactionValue($xaction, $edge, $dst_phid)

This method is not documented.
Parameters
PhabricatorApplicationTransaction$xaction
$edge
$dst_phid
Return
wild

protected function sortTransactions($xactions)

This method is not documented.
Parameters
array$xactions
Return
wild

protected function filterTransactions($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function validateTransaction($object, $type, $xactions)

Hook for validating transactions. This callback will be invoked for each available transaction type, even if an edit does not apply any transactions of that type. This allows you to raise exceptions when required fields are missing, by detecting that the object has no field value and there is no transaction which sets one.

Parameters
PhabricatorLiskDAO$objectObject being edited.
string$typeTransaction type to validate.
list<PhabricatorApplicationTransaction>$xactionsTransactions of given type, which may be empty if the edit does not apply any transactions of the given type.
Return
list<PhabricatorApplicationTransactionValidationError>List of validation errors.

public function validatePolicyTransaction($object, $xactions, $transaction_type, $capability)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
$transaction_type
$capability
Return
wild

private function validateSpaceTransactions($object, $xactions, $transaction_type)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
$transaction_type
Return
wild

private function validateSubtypeTransactions($object, $xactions, $transaction_type)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
$transaction_type
Return
wild

private function validateMFATransactions($object, $xactions, $transaction_type)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
$transaction_type
Return
wild

protected function adjustObjectForPolicyChecks($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function validateAllTransactions($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function validateIsEmptyTextField($field_value, $xactions)

Check for a missing text field.

A text field is missing if the object has no value and there are no transactions which set a value, or if the transactions remove the value. This method is intended to make implementing validateTransaction() more convenient:

$missing = $this->validateIsEmptyTextField(
  $object->getName(),
  $xactions);

This will return true if the net effect of the object and transactions is an empty field.

Parameters
wild$field_valueCurrent field value.
list<PhabricatorApplicationTransaction>$xactionsTransactions editing the field.
Return
boolTrue if the field will be an empty text field after edits.

final public function applyImplicitCC($object, $xactions)

When a user interacts with an object, we might want to add them to CC.

Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function shouldImplyCC($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

protected function shouldSendMail($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

private function buildMail($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

private function buildMailWithRecipients($object, $xactions, $email_to, $email_cc, $unexpandable)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
array$email_to
array$email_cc
array$unexpandable
Return
wild

protected function getTransactionsForMail($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

private function buildMailForTarget($object, $xactions, $target)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
PhabricatorMailTarget$target
Return
wild

private function addMailProjectMetadata($object, $template)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorMetaMTAMail$template
Return
wild

protected function getMailThreadID($object)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
Return
wild

protected function getStrongestAction($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function buildReplyHandler($object)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
Return
wild

protected function getMailSubjectPrefix()

This method is not documented.
Return
wild

protected function getMailTags($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

public function getMailTagsMap()

This method is not documented.
Return
wild

protected function getMailAction($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function buildMailTemplate($object)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
Return
wild

protected function getMailTo($object)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
Return
wild

protected function newMailUnexpandablePHIDs($object)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
Return
wild

protected function getMailCC($object)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
Return
wild

protected function buildMailBody($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function getObjectLinkButtonLabelForMail($object)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
Return
wild

protected function getObjectLinkButtonURIForMail($object)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
Return
wild

protected function addEmailPreferenceSectionToMailBody($body, $object, $xactions)

This method is not documented.
Parameters
PhabricatorMetaMTAMailBody$body
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function addHeadersAndCommentsToMailBody($body, $xactions, $object_label, $object_uri)

This method is not documented.
Parameters
PhabricatorMetaMTAMailBody$body
array$xactions
$object_label
$object_uri
Return
wild

private function getMailDiffSectionHeader($xaction)

This method is not documented.
Parameters
$xaction
Return
wild

protected function addCustomFieldsToMailBody($body, $object, $xactions)

This method is not documented.
Parameters
PhabricatorMetaMTAMailBody$body
PhabricatorLiskDAO$object
array$xactions
Return
wild

private function runHeraldMailRules($messages)

This method is not documented.
Parameters
array$messages
Return
wild

protected function shouldPublishFeedStory($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function getFeedStoryType()

This method is not documented.
Return
wild

protected function getFeedRelatedPHIDs($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function getFeedNotifyPHIDs($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function getFeedStoryData($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function publishFeedStory($object, $xactions, $mailed_phids)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
array$mailed_phids
Return
wild

protected function supportsSearch()

This method is not documented.
Return
wild

protected function shouldApplyHeraldRules($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function buildHeraldAdapter($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

private function setHeraldAdapter($adapter)

This method is not documented.
Parameters
HeraldAdapter$adapter
Return
wild

protected function getHeraldAdapter()

This method is not documented.
Return
wild

private function setHeraldTranscript($transcript)

This method is not documented.
Parameters
HeraldTranscript$transcript
Return
wild

protected function getHeraldTranscript()

This method is not documented.
Return
wild

private function applyHeraldRules($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function didApplyHeraldRules($object, $adapter, $transcript)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
HeraldAdapter$adapter
HeraldTranscript$transcript
Return
wild

private function getCustomFieldForTransaction($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

private function extractFilePHIDs($object, $xactions)

Extract the PHIDs of any files which these transactions attach.

Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

protected function extractFilePHIDsFromCustomTransaction($object, $xaction)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
Return
wild

private function attachFiles($object, $file_phids)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$file_phids
Return
wild

private function applyInverseEdgeTransactions($object, $xaction, $inverse_type)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorApplicationTransaction$xaction
$inverse_type
Return
wild

protected function willPublish($object, $xactions)

Load any object state which is required to publish transactions.

This hook is invoked in the main process before we compute data related to publishing transactions (like email "To" and "CC" lists), and again in the worker before publishing occurs.

Parameters
PhabricatorLiskDAO$object
array$xactions
Return
objectPublishable object.

final private function getWorkerState()

Convert the editor state to a serializable dictionary which can be passed to a worker.

This data will be loaded with loadWorkerState() in the worker.

Return
dict<string, wild>Serializable editor state.

protected function getCustomWorkerState()

Hook; return custom properties which need to be passed to workers.

Return
dict<string, wild>Custom properties.

protected function getCustomWorkerStateEncoding()

Hook; return storage encoding for custom properties which need to be passed to workers.

This primarily allows binary data to be passed to workers and survive JSON encoding.

Return
dict<string, string>Property encodings.

final public function loadWorkerState($state)

Load editor state using a dictionary emitted by getWorkerState().

This method is used to load state when running worker operations.

Parameters
dict<string,$statewild> Editor state, from @{method:getWorkerState}.
Return
this

protected function loadCustomWorkerState($state)

Hook; set custom properties on the editor from data emitted by getCustomWorkerState().

Parameters
dict<string,$statewild> Custom state, from @{method:getCustomWorkerState}.
Return
this

private function getAutomaticStateProperties()

Get a list of object properties which should be automatically sent to workers in the state data.

These properties will be automatically stored and loaded by the editor in the worker.

Return
list<string>List of properties.

final private function encodeStateForStorage($state, $encodings)

Apply encodings prior to storage.

See getCustomWorkerStateEncoding().

Parameters
map<string,$statewild> Map of values to encode.
map<string,$encodingsstring> Map of encodings to apply.
Return
map<string, wild>Map of encoded values.

final private function decodeStateFromStorage($state, $encodings)

Undo storage encoding applied when storing state.

See getCustomWorkerStateEncoding().

Parameters
map<string,$statewild> Map of encoded values.
map<string,$encodingsstring> Map of encodings.
Return
map<string, wild>Map of decoded values.

private function applyProjectConflictRules($phids)

Remove conflicts from a list of projects.

Objects aren't allowed to be tagged with multiple milestones in the same group, nor projects such that one tag is the ancestor of any other tag. If the list of PHIDs include mutually exclusive projects, remove the conflicting projects.

Parameters
list<phid>$phidsList of project PHIDs.
Return
list<phid>List with conflicts removed.

private function scrambleFileSecrets($object)

When the view policy for an object is changed, scramble the secret keys for attached files to invalidate existing URIs.

Parameters
$object
Return
wild

private function shouldScramblePolicy($policy)

Check if a policy is strong enough to justify scrambling. Objects which are set to very open policies don't need to scramble their files, and files with very open policies don't need to be scrambled when associated objects change.

Parameters
$policy
Return
wild

private function updateWorkboardColumns($object, $const, $old, $new)

This method is not documented.
Parameters
$object
$const
$old
$new
Return
wild

private function getModularTransactionTypes()

This method is not documented.
Return
wild

private function getModularTransactionType($type)

This method is not documented.
Parameters
$type
Return
wild

public function getCreateObjectTitle($author, $object)

This method is not documented.
Parameters
$author
$object
Return
wild

public function getCreateObjectTitleForFeed($author, $object)

This method is not documented.
Parameters
$author
$object
Return
wild

protected function queueTransaction($xaction)

This method is not documented.
Parameters
PhabricatorApplicationTransaction$xaction
Return
wild

private function flushTransactionQueue($object)

This method is not documented.
Parameters
$object
Return
wild

final protected function newSubEditor($template)

This method is not documented.
Parameters
PhabricatorApplicationTransactionEditor$template
Return
wild

private function newEditorCopy($template)

This method is not documented.
Parameters
PhabricatorApplicationTransactionEditor$template
Return
wild

public function newMailStampTemplates($object)

This method is not documented.
Parameters
$object
Return
wild

final public function getMailStamp($key)

This method is not documented.
Parameters
$key
Return
wild

private function newMailStamps($object, $xactions)

This method is not documented.
Parameters
$object
array$xactions
Return
wild

private function newMailExtensions($object)

This method is not documented.
Parameters
$object
Return
wild

protected function newAuxiliaryMail($object, $xactions)

This method is not documented.
Parameters
$object
array$xactions
Return
wild

private function generateMailStamps($object, $data)

This method is not documented.
Parameters
$object
$data
Return
wild

public function getRemovedRecipientPHIDs()

This method is not documented.
Return
wild

private function buildOldRecipientLists($object, $xactions)

This method is not documented.
Parameters
$object
$xactions
Return
wild

private function applyOldRecipientLists()

This method is not documented.
Return
wild

private function queueWebhooks($object, $xactions)

This method is not documented.
Parameters
$object
array$xactions
Return
wild

private function hasWarnings($object, $xaction)

This method is not documented.
Parameters
$object
$xaction
Return
wild

private function buildHistoryMail($object)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
Return
wild

public function newAutomaticInlineTransactions($object, $inlines, $transaction_type, $query_template)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$inlines
$transaction_type
PhabricatorCursorPagedPolicyAwareQuery$query_template
Return
wild

protected function newInlineStateTransaction($object, $query_template)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
PhabricatorCursorPagedPolicyAwareQuery$query_template
Return
wild

private function requireMFA($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

private function newMFATransactions($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

private function getTitleForTextMail($xaction)

This method is not documented.
Parameters
PhabricatorApplicationTransaction$xaction
Return
wild

private function getTitleForHTMLMail($xaction)

This method is not documented.
Parameters
PhabricatorApplicationTransaction$xaction
Return
wild

private function getBodyForTextMail($xaction)

This method is not documented.
Parameters
PhabricatorApplicationTransaction$xaction
Return
wild

private function isLockOverrideTransaction($xaction)

This method is not documented.
Parameters
PhabricatorApplicationTransaction$xaction
Return
wild

private function validateTransactionsWithExtensions($object, $xactions)

This method is not documented.
Parameters
PhabricatorLiskDAO$object
array$xactions
Return
wild

private function getEditorExtensions()

This method is not documented.
Return
wild

private function newEditorExtensions()

This method is not documented.
Return
wild