Changeset View
Changeset View
Standalone View
Standalone View
src/applications/slowvote/storage/PhabricatorSlowvotePoll.php
Show All 40 Lines | public static function initializeNewPoll(PhabricatorUser $actor) { | ||||
return id(new PhabricatorSlowvotePoll()) | return id(new PhabricatorSlowvotePoll()) | ||||
->setAuthorPHID($actor->getPHID()) | ->setAuthorPHID($actor->getPHID()) | ||||
->setViewPolicy($view_policy); | ->setViewPolicy($view_policy); | ||||
} | } | ||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_COLUMN_SCHEMA => array( | |||||
'question' => 'text255', | |||||
'responseVisibility' => 'uint32', | |||||
'shuffle' => 'uint32', | |||||
'method' => 'uint32', | |||||
'description' => 'text', | |||||
'isClosed' => 'bool', | |||||
), | |||||
self::CONFIG_KEY_SCHEMA => array( | |||||
'key_phid' => null, | |||||
'phid' => array( | |||||
'columns' => array('phid'), | |||||
), | |||||
), | |||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function generatePHID() { | public function generatePHID() { | ||||
return PhabricatorPHID::generateNewPHID( | return PhabricatorPHID::generateNewPHID( | ||||
PhabricatorSlowvotePollPHIDType::TYPECONST); | PhabricatorSlowvotePollPHIDType::TYPECONST); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines |