Browse Source

workshop : ajout champs "emailContact" et "website"

develop
Guillaume Bourgeois 2 years ago
parent
commit
9b8da8915f
3 changed files with 50 additions and 0 deletions
  1. +4
    -0
      Definition/Field/Workshop/WorkshopFieldDefinition.php
  2. +34
    -0
      Model/Workshop/Workshop.php
  3. +12
    -0
      Resources/translations/admin.fr.yaml

+ 4
- 0
Definition/Field/Workshop/WorkshopFieldDefinition.php View File

'hook', 'hook',
'title', 'title',
'description', 'description',
'emailContact',
'website',
'status' 'status'
]; ];
} }
'title' => TextField::new('title'), 'title' => TextField::new('title'),
'hook' => TextField::new('hook'), 'hook' => TextField::new('hook'),
'description' => CKEditorField::new('description'), 'description' => CKEditorField::new('description'),
'emailContact' => TextField::new('emailContact'),
'website' => TextField::new('website'),
'entries' => AssociationField::new('entries') 'entries' => AssociationField::new('entries')
->setTemplatePath('@LcPietro/admin/workshop/field/entries.html.twig') ->setTemplatePath('@LcPietro/admin/workshop/field/entries.html.twig')
]; ];

+ 34
- 0
Model/Workshop/Workshop.php View File

*/ */
protected $videoLink; protected $videoLink;


/**
* @ORM\Column(type="string", length=180, nullable=true)
*/
protected $emailContact;

/**
* @ORM\Column(type="string", length=256, nullable=true)
*/
protected $website;

public function __construct() public function __construct()
{ {
$this->entries = new ArrayCollection(); $this->entries = new ArrayCollection();


return $this; return $this;
} }

public function getEmailContact(): ?string
{
return $this->emailContact;
}

public function setEmailContact(string $emailContact): self
{
$this->emailContact = $emailContact;

return $this;
}

public function getWebsite(): ?string
{
return $this->website;
}

public function setWebsite(string $website): self
{
$this->website = $website;

return $this;
}
} }

+ 12
- 0
Resources/translations/admin.fr.yaml View File

label: Territoire label: Territoire
fields: fields:
name: Nom name: Nom
Workshop:
label: Atelier
label_plurial: Ateliers
fields:
workshopThematic: Thématique
entries: Inscriptions
type: Type
hook: Accroche
videoLink: Lien vidéo
emailContact: Email de contact
website: Site internet

form: form:
field: field:
dream: dream:

Loading…
Cancel
Save