From 9ddee160ab5bc2a2091a10b05db00ae6563a8501 Mon Sep 17 00:00:00 2001 From: aritz Date: Tue, 26 May 2026 07:57:52 +0200 Subject: [PATCH 1/5] ADD articles tags --- .../article/admin/_tags_field.html.twig | 130 ++++++++++++++++++ cms/contents/article/admin/create.html.twig | 2 +- cms/contents/article/admin/update.html.twig | 3 +- .../translations/sfs_cms_contents.en.yaml | 4 + .../translations/sfs_cms_contents.es.yaml | 4 + .../entities/ArticleContent.orm.xml | 2 + config/services/services.yaml | 12 ++ src/Form/Admin/Article/ArticleCreateForm.php | 16 ++- src/Form/Admin/Article/ArticleUpdateForm.php | 16 ++- src/Form/Type/ArticleTagsType.php | 56 ++++++++ src/Manager/ArticleEntityDuplicator.php | 1 + src/Manager/ArticleTagManager.php | 91 ++++++++++++ src/Migrations/Version20260525090000.php | 35 +++++ src/Model/ArticleContentInterface.php | 4 + src/Model/ArticleContentTrait.php | 36 +++++ 15 files changed, 396 insertions(+), 16 deletions(-) create mode 100644 cms/contents/article/admin/_tags_field.html.twig create mode 100644 src/Form/Type/ArticleTagsType.php create mode 100644 src/Manager/ArticleTagManager.php create mode 100644 src/Migrations/Version20260525090000.php diff --git a/cms/contents/article/admin/_tags_field.html.twig b/cms/contents/article/admin/_tags_field.html.twig new file mode 100644 index 0000000..3bbbcdb --- /dev/null +++ b/cms/contents/article/admin/_tags_field.html.twig @@ -0,0 +1,130 @@ +{% trans_default_domain 'sfs_cms_contents' %} + +
+ {{ form_label(form.tags) }} + {{ form_errors(form.tags) }} + {{ form_widget(form.tags) }} + +
+
+ +
+ + + {% for tag in form.tags.vars.tag_suggestions %} + + {% endfor %} + + +
{{ 'admin_article.form.tags.help'|trans }}
+
+ + diff --git a/cms/contents/article/admin/create.html.twig b/cms/contents/article/admin/create.html.twig index 9d21fcd..b763aae 100644 --- a/cms/contents/article/admin/create.html.twig +++ b/cms/contents/article/admin/create.html.twig @@ -20,4 +20,4 @@ {{ form_rest(form) }} -{% endblock form_fields %} \ No newline at end of file +{% endblock form_fields %} diff --git a/cms/contents/article/admin/update.html.twig b/cms/contents/article/admin/update.html.twig index b4e3d98..4583612 100644 --- a/cms/contents/article/admin/update.html.twig +++ b/cms/contents/article/admin/update.html.twig @@ -4,6 +4,7 @@ {{ form_row(form.name) }} {% if form.extraData is defined %}{{ form_widget(form.extraData) }}{% endif %} {{ form_row(form.publishedAt) }} + {% if form.tags is defined %}{% include '@content/article/admin/_tags_field.html.twig' with {'form': form} %}{% endif %} {% if form.author is defined %}{{ form_row(form.author) }}{% endif %} {{ form_rest(form) }} -{% endblock form_fields %} \ No newline at end of file +{% endblock form_fields %} diff --git a/cms/contents/article/translations/sfs_cms_contents.en.yaml b/cms/contents/article/translations/sfs_cms_contents.en.yaml index f90205c..8c2f874 100644 --- a/cms/contents/article/translations/sfs_cms_contents.en.yaml +++ b/cms/contents/article/translations/sfs_cms_contents.en.yaml @@ -89,6 +89,7 @@ admin_article: status: "Status" publishDate: "Publish date" author: "Author" + tags: "Tags" indexing: title: "Indexing" noIndex: @@ -318,6 +319,9 @@ admin_article: description.label: "Excerpt" publishedAt.label: "Visible published date time" author.label: "Author" + tags.label: "Tags" + tags.help: "Press Enter or comma to add each tag. Existing similar tags are reused." + tags.placeholder: "Write a tag" version_form: note.label: "Note" diff --git a/cms/contents/article/translations/sfs_cms_contents.es.yaml b/cms/contents/article/translations/sfs_cms_contents.es.yaml index 7562eae..231e668 100644 --- a/cms/contents/article/translations/sfs_cms_contents.es.yaml +++ b/cms/contents/article/translations/sfs_cms_contents.es.yaml @@ -88,6 +88,7 @@ admin_article: status: "Estado" publishDate: "Fecha de publicación" author: "Autor" + tags: "Etiquetas" indexing: title: "Indexado" noIndex: @@ -317,6 +318,9 @@ admin_article: description.label: "Excerpt" publishedAt.label: "Fecha de publicación visible" author.label: "Autor" + tags.label: "Etiquetas" + tags.help: "Pulsa Enter o coma para añadir cada etiqueta. Si ya existe una parecida, se reutiliza la misma." + tags.placeholder: "Escribe una etiqueta" version_form: note.label: "Nota" diff --git a/config/doctrine-mapping/entities/ArticleContent.orm.xml b/config/doctrine-mapping/entities/ArticleContent.orm.xml index a5651fc..cec183c 100644 --- a/config/doctrine-mapping/entities/ArticleContent.orm.xml +++ b/config/doctrine-mapping/entities/ArticleContent.orm.xml @@ -13,6 +13,8 @@ + + diff --git a/config/services/services.yaml b/config/services/services.yaml index ffdc333..e1ff5f4 100644 --- a/config/services/services.yaml +++ b/config/services/services.yaml @@ -16,6 +16,18 @@ services: resource: '../../src/Form/*' tags: ['form.type'] + Softspring\CmsBlogPlugin\Form\Admin\Article\ArticleCreateForm: + arguments: + $translatableContext: '@Softspring\CmsBundle\Translator\TranslatableContext' + $cmsConfig: '@Softspring\CmsBundle\Config\CmsConfig' + tags: ['form.type'] + + Softspring\CmsBlogPlugin\Form\Admin\Article\ArticleUpdateForm: + arguments: + $translatableContext: '@Softspring\CmsBundle\Translator\TranslatableContext' + $cmsConfig: '@Softspring\CmsBundle\Config\CmsConfig' + tags: ['form.type'] + Softspring\CmsBlogPlugin\Manager\: resource: '../../src/Manager/*' diff --git a/src/Form/Admin/Article/ArticleCreateForm.php b/src/Form/Admin/Article/ArticleCreateForm.php index 0e9b927..6442a1b 100644 --- a/src/Form/Admin/Article/ArticleCreateForm.php +++ b/src/Form/Admin/Article/ArticleCreateForm.php @@ -2,26 +2,24 @@ namespace Softspring\CmsBlogPlugin\Form\Admin\Article; -use ReflectionClass; use Softspring\CmsBlogPlugin\Model\ArticleAuthorInterface; +use Softspring\CmsBlogPlugin\Form\Type\ArticleTagsType; +use Softspring\CmsBundle\Config\CmsConfig; use Softspring\CmsBundle\Form\Admin\Content\ContentCreateForm; use Softspring\CmsBundle\Form\Type\UserType; -use Softspring\CmsBundle\Manager\ContentManagerInterface; use Softspring\CmsBundle\Translator\TranslatableContext; use Symfony\Component\Form\Extension\Core\Type\DateTimeType; use Symfony\Component\Form\FormBuilderInterface; class ArticleCreateForm extends ContentCreateForm { - public function __construct(protected ContentManagerInterface $contentManager, TranslatableContext $translatableContext) + public function __construct(TranslatableContext $translatableContext, CmsConfig $cmsConfig) { - parent::__construct($translatableContext); + parent::__construct($translatableContext, $cmsConfig); } public function buildForm(FormBuilderInterface $builder, array $options): void { - $entityClass = new ReflectionClass($this->contentManager->getTypeClass($options['content_config']['_id'])); - parent::buildForm($builder, $options); $builder->add('publishedAt', DateTimeType::class, [ @@ -29,7 +27,11 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'widget' => 'single_text', ]); - if ($entityClass->implementsInterface(ArticleAuthorInterface::class)) { + $builder->add('tags', ArticleTagsType::class); + + $dataClass = $options['data_class'] ?? null; + + if (is_string($dataClass) && is_a($dataClass, ArticleAuthorInterface::class, true)) { $builder->add('author', UserType::class, [ 'required' => true, ]); diff --git a/src/Form/Admin/Article/ArticleUpdateForm.php b/src/Form/Admin/Article/ArticleUpdateForm.php index 7d44a85..c5329a8 100644 --- a/src/Form/Admin/Article/ArticleUpdateForm.php +++ b/src/Form/Admin/Article/ArticleUpdateForm.php @@ -2,26 +2,24 @@ namespace Softspring\CmsBlogPlugin\Form\Admin\Article; -use ReflectionClass; use Softspring\CmsBlogPlugin\Model\ArticleAuthorInterface; +use Softspring\CmsBlogPlugin\Form\Type\ArticleTagsType; +use Softspring\CmsBundle\Config\CmsConfig; use Softspring\CmsBundle\Form\Admin\Content\ContentUpdateForm; use Softspring\CmsBundle\Form\Type\UserType; -use Softspring\CmsBundle\Manager\ContentManagerInterface; use Softspring\CmsBundle\Translator\TranslatableContext; use Symfony\Component\Form\Extension\Core\Type\DateTimeType; use Symfony\Component\Form\FormBuilderInterface; class ArticleUpdateForm extends ContentUpdateForm { - public function __construct(protected ContentManagerInterface $contentManager, TranslatableContext $translatableContext) + public function __construct(TranslatableContext $translatableContext, CmsConfig $cmsConfig) { - parent::__construct($translatableContext); + parent::__construct($translatableContext, $cmsConfig); } public function buildForm(FormBuilderInterface $builder, array $options): void { - $entityClass = new ReflectionClass($this->contentManager->getTypeClass($options['content_config']['_id'])); - parent::buildForm($builder, $options); $builder->add('publishedAt', DateTimeType::class, [ @@ -29,7 +27,11 @@ public function buildForm(FormBuilderInterface $builder, array $options): void 'widget' => 'single_text', ]); - if ($entityClass->implementsInterface(ArticleAuthorInterface::class)) { + $builder->add('tags', ArticleTagsType::class); + + $dataClass = $options['data_class'] ?? null; + + if (is_string($dataClass) && is_a($dataClass, ArticleAuthorInterface::class, true)) { $builder->add('author', UserType::class, [ 'required' => true, ]); diff --git a/src/Form/Type/ArticleTagsType.php b/src/Form/Type/ArticleTagsType.php new file mode 100644 index 0000000..9fab428 --- /dev/null +++ b/src/Form/Type/ArticleTagsType.php @@ -0,0 +1,56 @@ +addModelTransformer(new CallbackTransformer( + fn (?array $tags): string => json_encode($tags ?? [], JSON_THROW_ON_ERROR), + function (?string $tags): array { + if (empty($tags)) { + return []; + } + + $decodedTags = json_decode($tags, true); + + return is_array($decodedTags) ? $this->articleTagManager->canonicalizeTags($decodedTags) : []; + } + )); + } + + public function buildView(FormView $view, FormInterface $form, array $options): void + { + $view->vars['tag_suggestions'] = $options['tag_suggestions']; + } + + public function configureOptions(OptionsResolver $resolver): void + { + $resolver->setDefaults([ + 'required' => false, + 'empty_data' => '[]', + 'tag_suggestions' => fn (Options $options): array => $this->articleTagManager->getExistingTags(), + ]); + $resolver->setAllowedTypes('tag_suggestions', 'array'); + } + + public function getParent(): string + { + return HiddenType::class; + } +} diff --git a/src/Manager/ArticleEntityDuplicator.php b/src/Manager/ArticleEntityDuplicator.php index 447f3d7..510a812 100644 --- a/src/Manager/ArticleEntityDuplicator.php +++ b/src/Manager/ArticleEntityDuplicator.php @@ -21,5 +21,6 @@ public function duplicateData(ContentInterface $oldContent, ContentInterface $ne { $newContent->setAuthor($oldContent->getAuthor()); $newContent->setPublishedAt($oldContent->getPublishedAt()); + $newContent->setTags($oldContent->getTags()); } } diff --git a/src/Manager/ArticleTagManager.php b/src/Manager/ArticleTagManager.php new file mode 100644 index 0000000..fdb7ff0 --- /dev/null +++ b/src/Manager/ArticleTagManager.php @@ -0,0 +1,91 @@ +contentManager->getRepository('article')->createQueryBuilder('a') + ->select('a.tags') + ->andWhere('a.tags IS NOT NULL') + ->getQuery() + ->getScalarResult(); + + $tags = []; + $seenTags = []; + + foreach ($rows as $row) { + $rowTags = $row['tags'] ?? null; + + if (is_string($rowTags)) { + $decodedTags = json_decode($rowTags, true); + $rowTags = is_array($decodedTags) ? $decodedTags : []; + } + + if (!is_array($rowTags)) { + continue; + } + + foreach ($rowTags as $tag) { + if (!is_scalar($tag)) { + continue; + } + + $normalizedTag = preg_replace('/\s+/', ' ', trim((string) $tag)) ?: ''; + + if ('' === $normalizedTag) { + continue; + } + + $normalizedKey = mb_strtolower($normalizedTag); + + if (isset($seenTags[$normalizedKey])) { + continue; + } + + $seenTags[$normalizedKey] = $normalizedTag; + $tags[] = $normalizedTag; + } + } + + natcasesort($tags); + + return array_values($tags); + } + + public function canonicalizeTags(array $tags): array + { + $existingTags = []; + + foreach ($this->getExistingTags() as $existingTag) { + $existingTags[mb_strtolower($existingTag)] = $existingTag; + } + + $canonicalTags = []; + + foreach ($tags as $tag) { + if (!is_scalar($tag)) { + continue; + } + + $normalizedTag = preg_replace('/\s+/', ' ', trim((string) $tag)) ?: ''; + + if ('' === $normalizedTag) { + continue; + } + + $normalizedKey = mb_strtolower($normalizedTag); + $canonicalTags[] = $existingTags[$normalizedKey] ?? $normalizedTag; + $existingTags[$normalizedKey] = $existingTags[$normalizedKey] ?? $normalizedTag; + } + + return $canonicalTags; + } +} diff --git a/src/Migrations/Version20260525090000.php b/src/Migrations/Version20260525090000.php new file mode 100644 index 0000000..d5a1c18 --- /dev/null +++ b/src/Migrations/Version20260525090000.php @@ -0,0 +1,35 @@ +connection->getDatabasePlatform() instanceof PostgreSQLPlatform) { + $this->addSql('ALTER TABLE cms_content_blog_article ADD tags JSON DEFAULT NULL'); + $this->addSql("UPDATE cms_content_blog_article SET tags = '[]' WHERE tags IS NULL"); + + return; + } + + $this->addSql("ALTER TABLE cms_content_blog_article ADD tags LONGTEXT DEFAULT NULL COMMENT '(DC2Type:json)'"); + $this->addSql("UPDATE cms_content_blog_article SET tags = '[]' WHERE tags IS NULL"); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE cms_content_blog_article DROP tags'); + } +} diff --git a/src/Model/ArticleContentInterface.php b/src/Model/ArticleContentInterface.php index f22f0cb..ea73446 100644 --- a/src/Model/ArticleContentInterface.php +++ b/src/Model/ArticleContentInterface.php @@ -10,4 +10,8 @@ interface ArticleContentInterface extends ContentInterface public function getPublishedAt(): ?DateTime; public function setPublishedAt(?DateTime $publishedAt = null): void; + + public function getTags(): array; + + public function setTags(array $tags): void; } diff --git a/src/Model/ArticleContentTrait.php b/src/Model/ArticleContentTrait.php index 2e0da59..e04622f 100644 --- a/src/Model/ArticleContentTrait.php +++ b/src/Model/ArticleContentTrait.php @@ -8,6 +8,8 @@ trait ArticleContentTrait { protected ?int $publishedAt = null; + protected ?array $tags = []; + public function getPublishedAt(): ?DateTime { return $this->publishedAt ? DateTime::createFromFormat('U', "{$this->publishedAt}") : null; @@ -17,4 +19,38 @@ public function setPublishedAt(?DateTime $publishedAt = null): void { $this->publishedAt = $publishedAt instanceof DateTime ? (int) $publishedAt->format('U') : null; } + + public function getTags(): array + { + return $this->tags ?? []; + } + + public function setTags(array $tags): void + { + $normalizedTags = []; + $seenTags = []; + + foreach ($tags as $tag) { + if (!is_scalar($tag)) { + continue; + } + + $normalizedTag = preg_replace('/\s+/', ' ', trim((string) $tag)) ?: ''; + + if ('' === $normalizedTag) { + continue; + } + + $normalizedKey = mb_strtolower($normalizedTag); + + if (isset($seenTags[$normalizedKey])) { + continue; + } + + $seenTags[$normalizedKey] = true; + $normalizedTags[] = $normalizedTag; + } + + $this->tags = $normalizedTags; + } } From c073e0e8b77ac56a15f32c3cf1e16e55408ba491 Mon Sep 17 00:00:00 2001 From: aritz Date: Tue, 26 May 2026 08:07:07 +0200 Subject: [PATCH 2/5] ADD articles tags --- src/Form/Admin/Article/ArticleCreateForm.php | 5 ++--- src/Form/Admin/Article/ArticleUpdateForm.php | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Form/Admin/Article/ArticleCreateForm.php b/src/Form/Admin/Article/ArticleCreateForm.php index 6442a1b..ab19c48 100644 --- a/src/Form/Admin/Article/ArticleCreateForm.php +++ b/src/Form/Admin/Article/ArticleCreateForm.php @@ -4,7 +4,6 @@ use Softspring\CmsBlogPlugin\Model\ArticleAuthorInterface; use Softspring\CmsBlogPlugin\Form\Type\ArticleTagsType; -use Softspring\CmsBundle\Config\CmsConfig; use Softspring\CmsBundle\Form\Admin\Content\ContentCreateForm; use Softspring\CmsBundle\Form\Type\UserType; use Softspring\CmsBundle\Translator\TranslatableContext; @@ -13,9 +12,9 @@ class ArticleCreateForm extends ContentCreateForm { - public function __construct(TranslatableContext $translatableContext, CmsConfig $cmsConfig) + public function __construct(TranslatableContext $translatableContext) { - parent::__construct($translatableContext, $cmsConfig); + parent::__construct($translatableContext); } public function buildForm(FormBuilderInterface $builder, array $options): void diff --git a/src/Form/Admin/Article/ArticleUpdateForm.php b/src/Form/Admin/Article/ArticleUpdateForm.php index c5329a8..4a501f2 100644 --- a/src/Form/Admin/Article/ArticleUpdateForm.php +++ b/src/Form/Admin/Article/ArticleUpdateForm.php @@ -4,7 +4,6 @@ use Softspring\CmsBlogPlugin\Model\ArticleAuthorInterface; use Softspring\CmsBlogPlugin\Form\Type\ArticleTagsType; -use Softspring\CmsBundle\Config\CmsConfig; use Softspring\CmsBundle\Form\Admin\Content\ContentUpdateForm; use Softspring\CmsBundle\Form\Type\UserType; use Softspring\CmsBundle\Translator\TranslatableContext; @@ -13,9 +12,9 @@ class ArticleUpdateForm extends ContentUpdateForm { - public function __construct(TranslatableContext $translatableContext, CmsConfig $cmsConfig) + public function __construct(TranslatableContext $translatableContext) { - parent::__construct($translatableContext, $cmsConfig); + parent::__construct($translatableContext); } public function buildForm(FormBuilderInterface $builder, array $options): void From 5e0c2f3377abff4fe17a59d8d7c17857ecdc4431 Mon Sep 17 00:00:00 2001 From: aritz Date: Tue, 26 May 2026 08:14:35 +0200 Subject: [PATCH 3/5] ADD articles tags --- src/Data/EntityTransformer/ArticleEntityTransformer.php | 2 +- src/Form/Admin/Article/ArticleCreateForm.php | 2 +- src/Form/Admin/Article/ArticleUpdateForm.php | 2 +- src/Form/Type/ArticleTagsType.php | 2 +- src/Migrations/Version20230325161836.php | 2 +- src/Migrations/Version20260525090000.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Data/EntityTransformer/ArticleEntityTransformer.php b/src/Data/EntityTransformer/ArticleEntityTransformer.php index 98d97dd..c14ad2a 100644 --- a/src/Data/EntityTransformer/ArticleEntityTransformer.php +++ b/src/Data/EntityTransformer/ArticleEntityTransformer.php @@ -4,10 +4,10 @@ use DateTime; use Softspring\CmsBlogPlugin\Model\ArticleContentInterface; +use Softspring\CmsBundle\Model\ContentInterface; use Softspring\CmsDataPlugin\Data\EntityTransformer\ContentEntityTransformer; use Softspring\CmsDataPlugin\Data\Exception\InvalidElementException; use Softspring\CmsDataPlugin\Data\ReferencesRepository; -use Softspring\CmsBundle\Model\ContentInterface; class ArticleEntityTransformer extends ContentEntityTransformer { diff --git a/src/Form/Admin/Article/ArticleCreateForm.php b/src/Form/Admin/Article/ArticleCreateForm.php index ab19c48..594a8c9 100644 --- a/src/Form/Admin/Article/ArticleCreateForm.php +++ b/src/Form/Admin/Article/ArticleCreateForm.php @@ -2,8 +2,8 @@ namespace Softspring\CmsBlogPlugin\Form\Admin\Article; -use Softspring\CmsBlogPlugin\Model\ArticleAuthorInterface; use Softspring\CmsBlogPlugin\Form\Type\ArticleTagsType; +use Softspring\CmsBlogPlugin\Model\ArticleAuthorInterface; use Softspring\CmsBundle\Form\Admin\Content\ContentCreateForm; use Softspring\CmsBundle\Form\Type\UserType; use Softspring\CmsBundle\Translator\TranslatableContext; diff --git a/src/Form/Admin/Article/ArticleUpdateForm.php b/src/Form/Admin/Article/ArticleUpdateForm.php index 4a501f2..ff8ea51 100644 --- a/src/Form/Admin/Article/ArticleUpdateForm.php +++ b/src/Form/Admin/Article/ArticleUpdateForm.php @@ -2,8 +2,8 @@ namespace Softspring\CmsBlogPlugin\Form\Admin\Article; -use Softspring\CmsBlogPlugin\Model\ArticleAuthorInterface; use Softspring\CmsBlogPlugin\Form\Type\ArticleTagsType; +use Softspring\CmsBlogPlugin\Model\ArticleAuthorInterface; use Softspring\CmsBundle\Form\Admin\Content\ContentUpdateForm; use Softspring\CmsBundle\Form\Type\UserType; use Softspring\CmsBundle\Translator\TranslatableContext; diff --git a/src/Form/Type/ArticleTagsType.php b/src/Form/Type/ArticleTagsType.php index 9fab428..7408842 100644 --- a/src/Form/Type/ArticleTagsType.php +++ b/src/Form/Type/ArticleTagsType.php @@ -7,8 +7,8 @@ use Symfony\Component\Form\CallbackTransformer; use Symfony\Component\Form\Extension\Core\Type\HiddenType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Form\FormView; use Symfony\Component\Form\FormInterface; +use Symfony\Component\Form\FormView; use Symfony\Component\OptionsResolver\Options; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Migrations/Version20230325161836.php b/src/Migrations/Version20230325161836.php index cedff64..523921f 100644 --- a/src/Migrations/Version20230325161836.php +++ b/src/Migrations/Version20230325161836.php @@ -4,8 +4,8 @@ namespace Softspring\CmsBlogPlugin\Migrations; -use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Platforms\PostgreSQLPlatform; +use Doctrine\DBAL\Schema\Schema; use Doctrine\Migrations\AbstractMigration; final class Version20230325161836 extends AbstractMigration diff --git a/src/Migrations/Version20260525090000.php b/src/Migrations/Version20260525090000.php index d5a1c18..fa494eb 100644 --- a/src/Migrations/Version20260525090000.php +++ b/src/Migrations/Version20260525090000.php @@ -4,8 +4,8 @@ namespace Softspring\CmsBlogPlugin\Migrations; -use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Platforms\PostgreSQLPlatform; +use Doctrine\DBAL\Schema\Schema; use Doctrine\Migrations\AbstractMigration; final class Version20260525090000 extends AbstractMigration From aa03bda9328e67c4cdd039b2b90eec38c7e55b7f Mon Sep 17 00:00:00 2001 From: aritz Date: Tue, 26 May 2026 08:15:52 +0200 Subject: [PATCH 4/5] ADD articles tags --- src/Migrations/Version20230325161610.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Migrations/Version20230325161610.php b/src/Migrations/Version20230325161610.php index b2682a9..4178b6f 100644 --- a/src/Migrations/Version20230325161610.php +++ b/src/Migrations/Version20230325161610.php @@ -4,8 +4,8 @@ namespace Softspring\CmsBlogPlugin\Migrations; -use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Platforms\PostgreSQLPlatform; +use Doctrine\DBAL\Schema\Schema; use Doctrine\Migrations\AbstractMigration; final class Version20230325161610 extends AbstractMigration From c39892a8909c5262e592692d863bd6560664d19c Mon Sep 17 00:00:00 2001 From: aritz Date: Tue, 26 May 2026 10:43:28 +0200 Subject: [PATCH 5/5] ADD articles tags --- config/services/services.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/services/services.yaml b/config/services/services.yaml index e1ff5f4..a8ece70 100644 --- a/config/services/services.yaml +++ b/config/services/services.yaml @@ -19,13 +19,11 @@ services: Softspring\CmsBlogPlugin\Form\Admin\Article\ArticleCreateForm: arguments: $translatableContext: '@Softspring\CmsBundle\Translator\TranslatableContext' - $cmsConfig: '@Softspring\CmsBundle\Config\CmsConfig' tags: ['form.type'] Softspring\CmsBlogPlugin\Form\Admin\Article\ArticleUpdateForm: arguments: $translatableContext: '@Softspring\CmsBundle\Translator\TranslatableContext' - $cmsConfig: '@Softspring\CmsBundle\Config\CmsConfig' tags: ['form.type'] Softspring\CmsBlogPlugin\Manager\: