Source of file FlowchartVote.php
Size: 1,084 Bytes - Last Modified: 2021-12-24T06:40:37+00:00
/var/www/docs.ssmods.com/process/src/src/model/FlowchartVote.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 | <?php namespace ChTombleson\Flowchart\Models; use SilverStripe\ORM\DataObject; use ChTombleson\Flowchart\Models\Flowchart; use SilverStripe\Security\Permission; class FlowchartVote extends DataObject { /** * @var array */ private static $db = [ 'Value' => 'Int', 'IP' => 'Varchar(50)' ]; /** * @var array */ private static $has_one = [ 'Flowchart' => Flowchart::class, ]; /** * @var array */ private static $summary_fields = [ 'ID', 'Value' ]; /** * @inheritdoc */ public function canCreate($member = null, $context = array()) { return false; } /** * @inheritdoc */ public function canDelete($member = null) { return false; } /** * @inheritdoc */ public function canEdit($member = null) { return false; } /** * @inheritdoc */ public function canView($member = null) { return Permission::checkMember($member, ['VIEW_FLOWCHART']); } } |