Add initial Plenario live polling app
CI / Deploy / test (push) Successful in 49s
CI / Deploy / deploy (push) Failing after 5s

CakePHP 5.4 app for live polls: create via email without login, manage
via secret admin link, join via code. Includes slide types (choice,
wordcloud, open, scale, content), presenter mode, CSV export, captcha,
throttling, tests and Gitea CI/deploy workflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-07 13:24:29 +01:00
commit eb319f8c1e
120 files changed
+15572

No files matched your search

+58
View File
@@ -0,0 +1,58 @@
<?php
declare(strict_types=1);
namespace App\Model\Entity;
use Cake\ORM\Entity;
/**
* @property int $id
* @property string $title
* @property string $email
* @property string $admin_token_hash
* @property string $admin_token_encrypted
* @property string $join_code
* @property int|null $current_slide_id
* @property bool $is_active
* @property bool $show_results_to_participants
* @property \Cake\I18n\DateTime|null $last_admin_access
* @property \Cake\I18n\DateTime $created
* @property \Cake\I18n\DateTime $modified
* @property array<\App\Model\Entity\Slide> $slides
*/
class Poll extends Entity
{
/**
* Only harmless fields are mass assignable. Tokens, join code and the
* current slide are always set explicitly in code.
*
* @var array<string, bool>
*/
protected array $_accessible = [
'title' => true,
'email' => true,
'is_active' => true,
'show_results_to_participants' => true,
];
/**
* Never leak secrets when an entity is serialised (JSON, debug output).
*
* @var list<string>
*/
protected array $_hidden = [
'admin_token_hash',
'admin_token_encrypted',
'email',
];
/**
* "K7P2QX" -> "K7P 2QX" for nicer display.
*
* @return string
*/
public function formattedJoinCode(): string
{
return trim(chunk_split($this->join_code, 3, ' '));
}
}