diff --git a/src/Kunstmaan/GeneratorBundle/Resources/skeleton/default-pageparts/entities/pageparts/QuotePagePart.php b/src/Kunstmaan/GeneratorBundle/Resources/skeleton/default-pageparts/entities/pageparts/QuotePagePart.php new file mode 100644 index 0000000000..16bcf4b8b5 --- /dev/null +++ b/src/Kunstmaan/GeneratorBundle/Resources/skeleton/default-pageparts/entities/pageparts/QuotePagePart.php @@ -0,0 +1,63 @@ +title = $title; + + return $this; + } + + public function getTitle(): ?string + { + return $this->title; + } + + public function setText(?string $text): self + { + $this->text = $text; + + return $this; + } + + public function getText(): ?string + { + return $this->text; + } + + public function getDefaultView(): string + { + return 'pageparts/quote_pagepart/view.html.twig'; + } + + public function getDefaultAdminType(): string + { + return {{ admin_type_class }}::class; + } + +} diff --git a/src/Kunstmaan/GeneratorBundle/Resources/skeleton/default-pageparts/forms/pageparts/QuotePagePartAdminType.php b/src/Kunstmaan/GeneratorBundle/Resources/skeleton/default-pageparts/forms/pageparts/QuotePagePartAdminType.php new file mode 100644 index 0000000000..93b3235334 --- /dev/null +++ b/src/Kunstmaan/GeneratorBundle/Resources/skeleton/default-pageparts/forms/pageparts/QuotePagePartAdminType.php @@ -0,0 +1,32 @@ +add('title', TextType::class, [ + 'required' => true, + ]) + ->add('text', WysiwygType::class, [ + 'required' => true, + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => {{ pagepart_class }}::class, + ]); + } +} diff --git a/src/Kunstmaan/GeneratorBundle/Resources/skeleton/default-pageparts/templates/PageParts/QuotePagePart/view.html.twig b/src/Kunstmaan/GeneratorBundle/Resources/skeleton/default-pageparts/templates/PageParts/QuotePagePart/view.html.twig new file mode 100644 index 0000000000..3b49ec30fb --- /dev/null +++ b/src/Kunstmaan/GeneratorBundle/Resources/skeleton/default-pageparts/templates/PageParts/QuotePagePart/view.html.twig @@ -0,0 +1,4 @@ +
+

{{ resource.title }}

+ {{ resource.text|replace_url|raw }} +
\ No newline at end of file