forked from GNUsocial/gnu-social
[Poll] Added variable num of options
not sure if it is the right way to do it
This commit is contained in:
@@ -105,7 +105,9 @@ class PollResponse extends Entity
|
||||
// }}} Autocode
|
||||
|
||||
/**
|
||||
* The One True Thingy that must be defined and declared.
|
||||
* Entity schema definition
|
||||
*
|
||||
* @return array schema definition
|
||||
*/
|
||||
public static function schemaDef()
|
||||
{
|
||||
@@ -134,6 +136,14 @@ class PollResponse extends Entity
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a user already responded to the poll
|
||||
*
|
||||
* @param int $pollId
|
||||
* @param int $gsactorId user
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function exits(int $pollId, int $gsactorId): bool
|
||||
{
|
||||
$res = DB::dql('select pr from App\Entity\PollResponse pr
|
||||
|
||||
Reference in New Issue
Block a user