* initial commit
This commit is contained in:
73
src/App/Form/Slide.php
Normal file
73
src/App/Form/Slide.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Form;
|
||||
|
||||
use Zend\Form\Annotation;
|
||||
|
||||
/**
|
||||
* @Annotation\Name("slide")
|
||||
* @Annotation\Hydrator("doctrine.hydrator")
|
||||
*/
|
||||
class Slide
|
||||
{
|
||||
/**
|
||||
* @Annotation\Type("Zend\Form\Element\Hidden")
|
||||
* @Annotation\Required(false)
|
||||
* @var int
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @Annotation\Type("Zend\Form\Element\Text")
|
||||
* @Annotation\Required(true)
|
||||
* @Annotation\InputFilter("Zend\Filter\StringTrim")
|
||||
* @Annotation\Options({
|
||||
* "label": "Slide title"
|
||||
* })
|
||||
* @var string
|
||||
*/
|
||||
private $title;
|
||||
|
||||
/**
|
||||
* @Annotation\Type("Zend\Form\Element\Text")
|
||||
* @Annotation\Required(true)
|
||||
* @Annotation\Options({
|
||||
* "label": "Team",
|
||||
* "target_class": "App\Entity\Team",
|
||||
* "display_empty_item": false,
|
||||
* "empty_item_label": "",
|
||||
* "is_method": true,
|
||||
* "find_method": {
|
||||
* "name": "findBy",
|
||||
* "params": {
|
||||
* "criteria": {"isActive": true},
|
||||
* "orderBy": {"name": "ASC"}
|
||||
* }
|
||||
* }
|
||||
* })
|
||||
* @var
|
||||
*/
|
||||
private $team;
|
||||
|
||||
/**
|
||||
* @Annotation\Type("Zend\Form\Element\Text")
|
||||
* @Annotation\Required(true)
|
||||
* @Annotation\InputFilter("Zend\Filter\StringTrim")
|
||||
* @Annotation\Options({
|
||||
* "label": "Slide contents"
|
||||
* })
|
||||
* @var
|
||||
*/
|
||||
private $slideData;
|
||||
|
||||
/**
|
||||
* @Annotation\Type("Zend\Form\Element\Checkbox")
|
||||
* @Annotation\Options({
|
||||
* "label": "Visible"
|
||||
* })
|
||||
* @var bool
|
||||
*/
|
||||
private $isVisible;
|
||||
}
|
||||
Reference in New Issue
Block a user