浏览代码

workshop : ajout champs "emailContact" et "website"

develop
Guillaume Bourgeois 1年前
父节点
当前提交
9b8da8915f
共有 3 个文件被更改,包括 50 次插入0 次删除
  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 查看文件

'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 查看文件

*/ */
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 查看文件

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:

正在加载...
取消
保存