[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/legalpad/storage/ -> LegalpadTransactionComment.php (source)

   1  <?php
   2  
   3  final class LegalpadTransactionComment
   4    extends PhabricatorApplicationTransactionComment {
   5  
   6    protected $documentID;
   7    protected $lineNumber;
   8    protected $lineLength;
   9    protected $fixedState;
  10    protected $hasReplies = 0;
  11    protected $replyToCommentPHID;
  12  
  13    public function getApplicationTransactionObject() {
  14      return new LegalpadTransaction();
  15    }
  16  
  17    public function shouldUseMarkupCache($field) {
  18      // Only cache submitted comments.
  19      return ($this->getTransactionPHID() != null);
  20    }
  21  
  22    public function getConfiguration() {
  23      $config = parent::getConfiguration();
  24      $config[self::CONFIG_COLUMN_SCHEMA] = array(
  25        'documentID' => 'id?',
  26        'lineNumber' => 'uint32',
  27        'lineLength' => 'uint32',
  28        'fixedState' => 'text12?',
  29        'hasReplies' => 'bool',
  30        'replyToCommentPHID' => 'phid?',
  31      ) + $config[self::CONFIG_COLUMN_SCHEMA];
  32      $config[self::CONFIG_KEY_SCHEMA] = array(
  33        'key_draft' => array(
  34          'columns' => array('authorPHID', 'documentID', 'transactionPHID'),
  35          'unique' => true,
  36        ),
  37      ) + $config[self::CONFIG_KEY_SCHEMA];
  38      return $config;
  39    }
  40  
  41  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1