Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/storage/PhabricatorFileAttachment.php
Show All 40 Lines | final class PhabricatorFileAttachment | ||||
public static function getModeList() { | public static function getModeList() { | ||||
return array( | return array( | ||||
self::MODE_ATTACH, | self::MODE_ATTACH, | ||||
self::MODE_REFERENCE, | self::MODE_REFERENCE, | ||||
self::MODE_DETACH, | self::MODE_DETACH, | ||||
); | ); | ||||
} | } | ||||
public function isPolicyAttachment() { | |||||
switch ($this->getAttachmentMode()) { | |||||
case self::MODE_ATTACH: | |||||
return true; | |||||
default: | |||||
return false; | |||||
} | |||||
} | |||||
public function attachObject($object) { | public function attachObject($object) { | ||||
$this->object = $object; | $this->object = $object; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getObject() { | public function getObject() { | ||||
return $this->assertAttached($this->object); | return $this->assertAttached($this->object); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |