Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phame/storage/PhameBlog.php
Show All 18 Lines | final class PhameBlog extends PhameDAO | ||||
protected $domain; | protected $domain; | ||||
protected $configData; | protected $configData; | ||||
protected $creatorPHID; | protected $creatorPHID; | ||||
protected $viewPolicy; | protected $viewPolicy; | ||||
protected $editPolicy; | protected $editPolicy; | ||||
protected $status; | protected $status; | ||||
protected $mailKey; | protected $mailKey; | ||||
protected $profileImagePHID; | protected $profileImagePHID; | ||||
protected $headerImagePHID; | |||||
private $profileImageFile = self::ATTACHABLE; | private $profileImageFile = self::ATTACHABLE; | ||||
private $headerImageFile = self::ATTACHABLE; | |||||
const STATUS_ACTIVE = 'active'; | const STATUS_ACTIVE = 'active'; | ||||
const STATUS_ARCHIVED = 'archived'; | const STATUS_ARCHIVED = 'archived'; | ||||
protected function getConfiguration() { | protected function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
'configData' => self::SERIALIZATION_JSON, | 'configData' => self::SERIALIZATION_JSON, | ||||
), | ), | ||||
self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
'name' => 'text64', | 'name' => 'text64', | ||||
'description' => 'text', | 'description' => 'text', | ||||
'domain' => 'text128?', | 'domain' => 'text128?', | ||||
'status' => 'text32', | 'status' => 'text32', | ||||
'mailKey' => 'bytes20', | 'mailKey' => 'bytes20', | ||||
'profileImagePHID' => 'phid?', | 'profileImagePHID' => 'phid?', | ||||
'headerImagePHID' => 'phid?', | |||||
// T6203/NULLABILITY | // T6203/NULLABILITY | ||||
// These policies should always be non-null. | // These policies should always be non-null. | ||||
'editPolicy' => 'policy?', | 'editPolicy' => 'policy?', | ||||
'viewPolicy' => 'policy?', | 'viewPolicy' => 'policy?', | ||||
), | ), | ||||
self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
'key_phid' => null, | 'key_phid' => null, | ||||
▲ Show 20 Lines • Show All 153 Lines • ▼ Show 20 Lines | public function attachProfileImageFile(PhabricatorFile $file) { | ||||
$this->profileImageFile = $file; | $this->profileImageFile = $file; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getProfileImageFile() { | public function getProfileImageFile() { | ||||
return $this->assertAttached($this->profileImageFile); | return $this->assertAttached($this->profileImageFile); | ||||
} | } | ||||
public function getHeaderImageURI() { | |||||
return $this->getHeaderImageFile()->getBestURI(); | |||||
} | |||||
public function attachHeaderImageFile(PhabricatorFile $file) { | |||||
$this->headerImageFile = $file; | |||||
return $this; | |||||
} | |||||
public function getHeaderImageFile() { | |||||
return $this->assertAttached($this->headerImageFile); | |||||
} | |||||
/* -( PhabricatorPolicyInterface Implementation )-------------------------- */ | /* -( PhabricatorPolicyInterface Implementation )-------------------------- */ | ||||
public function getCapabilities() { | public function getCapabilities() { | ||||
return array( | return array( | ||||
PhabricatorPolicyCapability::CAN_VIEW, | PhabricatorPolicyCapability::CAN_VIEW, | ||||
PhabricatorPolicyCapability::CAN_EDIT, | PhabricatorPolicyCapability::CAN_EDIT, | ||||
▲ Show 20 Lines • Show All 158 Lines • Show Last 20 Lines |