@@ 44-60 (lines=17) @@ | ||
41 | * |
|
42 | * @throws \RuntimeException |
|
43 | */ |
|
44 | public function generate(BundleInterface $bundle, $entity, $prefix, array $sections, $behatTest) |
|
45 | { |
|
46 | $this->bundle = $bundle; |
|
47 | $this->entity = $entity; |
|
48 | $this->prefix = $prefix; |
|
49 | $this->sections = $sections; |
|
50 | ||
51 | $this->generatePagePartEntity(); |
|
52 | if ($entity != 'AbstractPagePart') { |
|
53 | $this->generateFormType(); |
|
54 | $this->generateResourceTemplate(); |
|
55 | $this->generateSectionConfig(); |
|
56 | if ($behatTest) { |
|
57 | $this->generateBehatTest(); |
|
58 | } |
|
59 | } |
|
60 | } |
|
61 | ||
62 | /** |
|
63 | * Generate the pagepart entity. |
@@ 55-70 (lines=16) @@ | ||
52 | * |
|
53 | * @throws \RuntimeException |
|
54 | */ |
|
55 | public function generate(BundleInterface $bundle, $entity, $prefix, array $fields, array $sections, $behatTest) |
|
56 | { |
|
57 | $this->bundle = $bundle; |
|
58 | $this->entity = $entity; |
|
59 | $this->prefix = $prefix; |
|
60 | $this->fields = $fields; |
|
61 | $this->sections = $sections; |
|
62 | ||
63 | $this->generatePagePartEntity(); |
|
64 | $this->generateFormType(); |
|
65 | $this->generateResourceTemplate(); |
|
66 | $this->generateSectionConfig(); |
|
67 | if ($behatTest) { |
|
68 | $this->generateBehatTest(); |
|
69 | } |
|
70 | } |
|
71 | ||
72 | /** |
|
73 | * Generate the pagepart entity. |