File tree Expand file tree Collapse file tree 2 files changed +50
-3
lines changed
Expand file tree Collapse file tree 2 files changed +50
-3
lines changed Original file line number Diff line number Diff line change 22
33namespace DigipolisGent \Domainator9k \AppTypes \DrupalSevenBundle \Entity ;
44
5+ use DigipolisGent \Domainator9k \AppTypes \DrupalSevenBundle \Form \Type \DrupalSevenApplicationFormType ;
56use DigipolisGent \Domainator9k \CoreBundle \Entity \AbstractApplication ;
67use Doctrine \ORM \Mapping as ORM ;
78use Symfony \Component \Validator \Constraints as Assert ;
@@ -26,12 +27,22 @@ class DrupalSevenApplication extends AbstractApplication
2627 */
2728 protected $ installProfile ;
2829
29-
30- public static function getType ()
30+ /**
31+ * @return string
32+ */
33+ public static function getApplicationType (): string
3134 {
3235 return self ::TYPE ;
3336 }
3437
38+ /**
39+ * @return string
40+ */
41+ public static function getFormType (): string
42+ {
43+ return DrupalSevenApplicationFormType::class;
44+ }
45+
3546 /**
3647 * @return string
3748 */
@@ -54,7 +65,7 @@ public function setInstallProfile(string $installProfile)
5465 public static function getTemplateReplacements (): array
5566 {
5667 $ templateReplacements = parent ::getTemplateReplacements ();
57- $ templateReplacements ['installProfile() ' ] = 'getInstallProfile() ' ;
68+ $ templateReplacements ['installProfile() ' ] = 'getInstallProfile() ' ;
5869
5970 return $ templateReplacements ;
6071 }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+
4+ namespace DigipolisGent \Domainator9k \AppTypes \DrupalSevenBundle \Form \Type ;
5+
6+ use DigipolisGent \Domainator9k \AppTypes \DrupalSevenBundle \Entity \DrupalSevenApplication ;
7+ use DigipolisGent \Domainator9k \CoreBundle \Form \Type \AbstractApplicationFormType ;
8+ use Symfony \Component \Form \FormBuilderInterface ;
9+ use Symfony \Component \OptionsResolver \OptionsResolver ;
10+
11+ /**
12+ * Class DrupalSevenApplicationFormType
13+ * @package DigipolisGent\Domainator9k\AppTypes\DrupalSevenBundle\Form\Type
14+ */
15+ class DrupalSevenApplicationFormType extends AbstractApplicationFormType
16+ {
17+
18+ /**
19+ * @param FormBuilderInterface $builder
20+ * @param array $options
21+ */
22+ public function buildForm (FormBuilderInterface $ builder , array $ options )
23+ {
24+ parent ::buildForm ($ builder , $ options );
25+ $ builder ->add ('installProfile ' );
26+ }
27+
28+ /**
29+ * @param OptionsResolver $resolver
30+ */
31+ public function configureOptions (OptionsResolver $ resolver )
32+ {
33+ parent ::configureOptions ($ resolver );
34+ $ resolver ->setDefault ('data_class ' ,DrupalSevenApplication::class);
35+ }
36+ }
You can’t perform that action at this time.
0 commit comments