Skip to content

Commit

Permalink
WEBDOM-281 : webform implementation added
Browse files Browse the repository at this point in the history
  • Loading branch information
PMassoels committed Feb 12, 2018
1 parent 1ebaf36 commit 73a4b15
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Entity/LaravelApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace DigipolisGent\Domainator9k\AppTypes\LaravelBundle\Entity;

use DigipolisGent\Domainator9k\AppTypes\LaravelBundle\Form\Type\LaravelApplicationFormType;
use DigipolisGent\Domainator9k\CoreBundle\Entity\AbstractApplication;
use Doctrine\ORM\Mapping as ORM;

Expand All @@ -16,8 +17,19 @@ class LaravelApplication extends AbstractApplication
{
const TYPE = "LARAVEL";

public static function getType()
/**
* @return string
*/
public static function getApplicationType(): string
{
return self::TYPE;
}
}

/**
* @return string
*/
public static function getFormType(): string
{
return LaravelApplicationFormType::class;
}
}
25 changes: 25 additions & 0 deletions Form/Type/LaravelApplicationFormType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php


namespace DigipolisGent\Domainator9k\AppTypes\LaravelBundle\Form\Type;

use DigipolisGent\Domainator9k\AppTypes\LaravelBundle\Entity\LaravelApplication;
use DigipolisGent\Domainator9k\CoreBundle\Form\Type\AbstractApplicationFormType;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Class LaravelApplicationFormType
* @package DigipolisGent\Domainator9k\AppTypes\LaravelBundle\Form\Type
*/
class LaravelApplicationFormType extends AbstractApplicationFormType
{

/**
* @param OptionsResolver $resolver
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefault('data_class', LaravelApplication::class);
}
}

0 comments on commit 73a4b15

Please sign in to comment.