Skip to content

Commit

Permalink
Add development branch for Article Bundle 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Aug 8, 2024
1 parent 262ac02 commit ed9ecf4
Show file tree
Hide file tree
Showing 10 changed files with 137 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,10 @@ DATABASE_URL="mysql://root:[email protected]:3306/su_myapp?serverVersion=8.0.32
# Email address that will receive system notifications and might be used as universal fallback value by bundles
SULU_ADMIN_EMAIL=example@localhost
###< sulu/sulu ###

###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
###< symfony/messenger ###
9 changes: 9 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
"docs": "https://docs.sulu.io/",
"chat": "https://sulu.io/services-and-support#chat"
},
"repositories": [
{
"type": "vcs",
"url": "[email protected]:alexander-schranz/SuluArticleBundle.git"
}
],
"require": {
"php": "^8.2",
"ext-ctype": "*",
Expand All @@ -41,6 +47,9 @@
"scheb/2fa-email": "^7.2",
"scheb/2fa-trusted-device": "^7.2",
"stof/doctrine-extensions-bundle": "^1.11",
"sulu/article-bundle": "dev-feature/content-article-repository as 3.0.0",
"sulu/content-bundle": "^0.7.1 || ^0.8",
"sulu/messenger": "^0.2.3",
"sulu/sulu": "~2.6.4",
"symfony/config": "^7.1",
"symfony/dotenv": "^7.1",
Expand Down
3 changes: 3 additions & 0 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@
Sulu\Bundle\TrashBundle\SuluTrashBundle::class => ['all' => true],
Sulu\Bundle\ReferenceBundle\SuluReferenceBundle::class => ['all' => true],
Scheb\TwoFactorBundle\SchebTwoFactorBundle::class => ['all' => true],
Sulu\Bundle\ContentBundle\SuluContentBundle::class => ['all' => true],
Sulu\Messenger\Infrastructure\Symfony\HttpKernel\SuluMessengerBundle::class => ['all' => true],
Sulu\Article\Infrastructure\Symfony\HttpKernel\SuluArticleBundle::class => ['all' => true],
];
22 changes: 22 additions & 0 deletions config/packages/messenger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
framework:
messenger:
# Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
# failure_transport: failed

transports:
# https://symfony.com/doc/current/messenger.html#transport-configuration
# async: '%env(MESSENGER_TRANSPORT_DSN)%'
# failed: 'doctrine://default?queue_name=failed'
# sync: 'sync://'

routing:
# Route your messages to the transports
# 'App\Message\YourMessage': async

# when@test:
# framework:
# messenger:
# transports:
# # replace with your transport name here (e.g., my_transport: 'in-memory://')
# # For more Messenger testing tools, see https://github.com/zenstruck/messenger-test
# async: 'in-memory://'
7 changes: 7 additions & 0 deletions config/packages/sulu_next_article.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sulu_next_article: {}

sulu_core:
content:
structure:
default_type:
article: 'article'
2 changes: 2 additions & 0 deletions config/packages/workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
framework:
workflows: null
4 changes: 4 additions & 0 deletions config/routes/sulu_admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,7 @@ sulu_reference_api:
resource: "@SuluReferenceBundle/Resources/config/routing_api.yml"
type: rest
prefix: /admin/api

sulu_article_api:
resource: "@SuluNextArticleBundle/config/routing_admin_api.yaml"
prefix: /admin/api
46 changes: 46 additions & 0 deletions config/templates/articles/article.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" ?>
<template xmlns="http://schemas.sulu.io/template/template"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.sulu.io/template/template http://schemas.sulu.io/template/template-1.0.xsd">

<key>article</key>

<view>articles/article</view>
<controller>Sulu\Bundle\WebsiteBundle\Controller\DefaultController::indexAction</controller>
<cacheLifetime>604800</cacheLifetime>

<meta>
<title lang="en">Article</title>
<title lang="de">Artikel</title>
</meta>

<properties>
<property name="title" type="text_line" mandatory="true">
<meta>
<title lang="en">Title</title>
<title lang="de">Titel</title>
</meta>
<params>
<param name="headline" value="true"/>
</params>

<tag name="sulu.rlp.part"/>
</property>

<property name="url" type="route">
<meta>
<title lang="en">Resourcelocator</title>
<title lang="de">Adresse</title>
</meta>

<tag name="sulu.rlp"/>
</property>

<property name="article" type="text_editor">
<meta>
<title lang="en">Article</title>
<title lang="de">Artikel</title>
</meta>
</property>
</properties>
</template>
30 changes: 30 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@
"config/packages/stof_doctrine_extensions.yaml"
]
},
"sulu/article-bundle": {
"version": "dev-feature/content-article-repository"
},
"sulu/content-bundle": {
"version": "0.7.2"
},
"symfony-cmf/routing-bundle": {
"version": "3.1.0"
},
Expand Down Expand Up @@ -254,6 +260,18 @@
"config/packages/mailer.yaml"
]
},
"symfony/messenger": {
"version": "6.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "6.0",
"ref": "ba1ac4e919baba5644d31b57a3284d6ba12d52ee"
},
"files": [
"config/packages/messenger.yaml"
]
},
"symfony/monolog-bundle": {
"version": "3.10",
"recipe": {
Expand Down Expand Up @@ -357,5 +375,17 @@
"config/packages/web_profiler.yaml",
"config/routes/web_profiler.yaml"
]
},
"symfony/workflow": {
"version": "6.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "3.3",
"ref": "3b2f8ca32a07fcb00f899649053943fa3d8bbfb6"
},
"files": [
"config/packages/workflow.yaml"
]
}
}
7 changes: 7 additions & 0 deletions templates/articles/article.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends "base.html.twig" %}

{% block content %}
<h1>{{ content.title }}</h1>

{{ content.article|raw }}
{% endblock %}

0 comments on commit ed9ecf4

Please sign in to comment.