public function updateFormComponent(PageComponentDto $componentDto)
 {
     $this->validateComponentType($componentDto, PageComponentType::FORM());
     $pageComponent = $this->pageComponentMapper->mapDtoToPageComponent($componentDto);
     $bannerComponent = PageComponentFilter::filter($componentDto, false);
     $this->updateComponent($pageComponent, $bannerComponent);
 }
 public static function getComponentType(PageComponent $pageComponent)
 {
     if (!empty($pageComponent->getBannerId())) {
         return PageComponentType::BANNER();
     }
     if (!empty($pageComponent->getFormId())) {
         return PageComponentType::FORM();
     }
     if (!empty($pageComponent->getHeaderId())) {
         return PageComponentType::HEADER();
     }
     if (!empty($pageComponent->getImageId())) {
         return PageComponentType::IMAGE();
     }
     if (!empty($pageComponent->getTextId())) {
         return PageComponentType::TEXT();
     }
     if (!empty($pageComponent->getUserGalleryId())) {
         return PageComponentType::USERGALLERY();
     }
     return null;
 }