Path: blob/master/src/applications/calendar/storage/PhabricatorCalendarImportLog.php
12253 views
<?php12final class PhabricatorCalendarImportLog3extends PhabricatorCalendarDAO4implements5PhabricatorPolicyInterface,6PhabricatorDestructibleInterface {78protected $importPHID;9protected $parameters = array();1011private $import = self::ATTACHABLE;12private $logType = self::ATTACHABLE;1314protected function getConfiguration() {15return array(16self::CONFIG_SERIALIZATION => array(17'parameters' => self::SERIALIZATION_JSON,18),19self::CONFIG_KEY_SCHEMA => array(20'key_import' => array(21'columns' => array('importPHID'),22),23),24) + parent::getConfiguration();25}2627public function getParameter($key, $default = null) {28return idx($this->parameters, $key, $default);29}3031public function setParameter($key, $value) {32$this->parameters[$key] = $value;33return $this;34}3536public function getImport() {37return $this->assertAttached($this->import);38}3940public function attachImport(PhabricatorCalendarImport $import) {41$this->import = $import;42return $this;43}4445public function getDisplayIcon(PhabricatorUser $viewer) {46return $this->getLogType()->getDisplayIcon($viewer, $this);47}4849public function getDisplayColor(PhabricatorUser $viewer) {50return $this->getLogType()->getDisplayColor($viewer, $this);51}5253public function getDisplayType(PhabricatorUser $viewer) {54return $this->getLogType()->getDisplayType($viewer, $this);55}5657public function getDisplayDescription(PhabricatorUser $viewer) {58return $this->getLogType()->getDisplayDescription($viewer, $this);59}6061public function getLogType() {62return $this->assertAttached($this->logType);63}6465public function attachLogType(PhabricatorCalendarImportLogType $type) {66$this->logType = $type;67return $this;68}697071/* -( PhabricatorPolicyInterface )----------------------------------------- */727374public function getCapabilities() {75return array(76PhabricatorPolicyCapability::CAN_VIEW,77);78}7980public function getPolicy($capability) {81return PhabricatorPolicies::getMostOpenPolicy();82}8384public function hasAutomaticCapability($capability, PhabricatorUser $viewer) {85return false;86}878889/* -( PhabricatorDestructibleInterface )----------------------------------- */909192public function destroyObjectPermanently(93PhabricatorDestructionEngine $engine) {94$viewer = $engine->getViewer();95$this->delete();96}9798}99100101