add price
This commit is contained in:
parent
e2b627a1d5
commit
1a212359a1
|
@ -91,6 +91,11 @@ class Intervention implements EntityInterface
|
|||
*/
|
||||
protected $establishmentGroups;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="float", nullable=true)
|
||||
*/
|
||||
private $price;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->speakers = new ArrayCollection();
|
||||
|
@ -325,4 +330,16 @@ class Intervention implements EntityInterface
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPrice(): ?float
|
||||
{
|
||||
return $this->price;
|
||||
}
|
||||
|
||||
public function setPrice(?float $price): self
|
||||
{
|
||||
$this->price = $price;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use App\Entity\Establishment;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
||||
|
||||
class InterventionType extends AbstractType
|
||||
{
|
||||
|
@ -32,6 +33,14 @@ class InterventionType extends AbstractType
|
|||
->add('tools', null, [
|
||||
'expanded' => true,
|
||||
])
|
||||
->add('price', NumberType::class, [
|
||||
'attr' => [
|
||||
'step' => 0.01,
|
||||
],
|
||||
'scale' => 2,
|
||||
'required' => false,
|
||||
'html5' => true,
|
||||
])
|
||||
->add('toolsDetails', null, [
|
||||
'attr' => ['rows' => 5],
|
||||
])
|
||||
|
|
Loading…
Reference in a new issue