RoomCategory - Added order field for front-end home page.
This commit is contained in:
@@ -33,6 +33,7 @@ class RoomCategoryCrudController extends AbstractCrudController
|
||||
yield TextField::new('name');
|
||||
yield TextField::new('description');
|
||||
yield IntegerField::new('maxGuestNum');
|
||||
yield IntegerField::new('orderHomePage');
|
||||
yield CollectionField::new('roomCategoryPhotos')->useEntryCrudForm();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,9 @@ class RoomCategory
|
||||
#[ORM\Column(nullable: false)]
|
||||
private ?int $maxGuestNum = null;
|
||||
|
||||
#[ORM\Column(type: Types::SMALLINT, nullable: true)]
|
||||
private ?int $orderHomePage = null;
|
||||
|
||||
/**
|
||||
* @var Collection<int, RoomCategoryPhoto>
|
||||
*/
|
||||
@@ -84,6 +87,18 @@ class RoomCategory
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getOrderHomePage(): ?int
|
||||
{
|
||||
return $this->orderHomePage;
|
||||
}
|
||||
|
||||
public function setOrderHomePage(?int $orderHomePage): static
|
||||
{
|
||||
$this->orderHomePage = $orderHomePage;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, RoomCategoryPhoto>
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user