Skip to content

Commit 7ee26d6

Browse files
Add development branch for Article Bundle 3.0
1 parent 5e349a7 commit 7ee26d6

File tree

6 files changed

+76
-0
lines changed

6 files changed

+76
-0
lines changed

composer.json

+9
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
"docs": "https://docs.sulu.io/",
2727
"chat": "https://sulu.io/services-and-support#chat"
2828
},
29+
"repositories": [
30+
{
31+
"type": "vcs",
32+
"url": "[email protected]:alexander-schranz/SuluArticleBundle.git"
33+
}
34+
],
2935
"require": {
3036
"php": "^8.1",
3137
"ext-ctype": "*",
@@ -40,6 +46,9 @@
4046
"scheb/2fa-email": "^6.1",
4147
"scheb/2fa-trusted-device": "^6.1",
4248
"stof/doctrine-extensions-bundle": "^1.8",
49+
"sulu/article-bundle": "dev-feature/content-article-repository as 3.0.0",
50+
"sulu/content-bundle": "^0.7.1",
51+
"sulu/messenger": "^0.2.2",
4352
"sulu/sulu": "~2.6.0@dev",
4453
"symfony/config": "^6.3",
4554
"symfony/dotenv": "^6.3",

config/bundles.php

+3
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,7 @@
4444
Sulu\Bundle\ActivityBundle\SuluActivityBundle::class => ['all' => true],
4545
Sulu\Bundle\TrashBundle\SuluTrashBundle::class => ['all' => true],
4646
Scheb\TwoFactorBundle\SchebTwoFactorBundle::class => ['all' => true],
47+
Sulu\Bundle\ContentBundle\SuluContentBundle::class => ['all' => true],
48+
Sulu\Messenger\Infrastructure\Symfony\HttpKernel\SuluMessengerBundle::class => ['all' => true],
49+
Sulu\Article\Infrastructure\Symfony\HttpKernel\SuluArticleBundle::class => ['all' => true],
4750
];
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
sulu_next_article: {}
2+
3+
sulu_core:
4+
content:
5+
structure:
6+
default_type:
7+
article: 'article'

config/routes/sulu_admin.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,7 @@ sulu_trash_api:
107107
resource: "@SuluTrashBundle/Resources/config/routing_api.yml"
108108
type: rest
109109
prefix: /admin/api
110+
111+
sulu_article_api:
112+
resource: "@SuluNextArticleBundle/config/routing_admin_api.yaml"
113+
prefix: /admin/api

config/templates/articles/article.xml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" ?>
2+
<template xmlns="http://schemas.sulu.io/template/template"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://schemas.sulu.io/template/template http://schemas.sulu.io/template/template-1.0.xsd">
5+
6+
<key>article</key>
7+
8+
<view>articles/article</view>
9+
<controller>Sulu\Bundle\WebsiteBundle\Controller\DefaultController::indexAction</controller>
10+
<cacheLifetime>604800</cacheLifetime>
11+
12+
<meta>
13+
<title lang="en">Article</title>
14+
<title lang="de">Artikel</title>
15+
</meta>
16+
17+
<properties>
18+
<property name="title" type="text_line" mandatory="true">
19+
<meta>
20+
<title lang="en">Title</title>
21+
<title lang="de">Titel</title>
22+
</meta>
23+
<params>
24+
<param name="headline" value="true"/>
25+
</params>
26+
27+
<tag name="sulu.rlp.part"/>
28+
</property>
29+
30+
<property name="url" type="route">
31+
<meta>
32+
<title lang="en">Resourcelocator</title>
33+
<title lang="de">Adresse</title>
34+
</meta>
35+
36+
<tag name="sulu.rlp"/>
37+
</property>
38+
39+
<property name="article" type="text_editor">
40+
<meta>
41+
<title lang="en">Article</title>
42+
<title lang="de">Artikel</title>
43+
</meta>
44+
</property>
45+
</properties>
46+
</template>

templates/articles/article.html.twig

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% extends "base.html.twig" %}
2+
3+
{% block content %}
4+
<h1>{{ content.title }}</h1>
5+
6+
{{ content.article|raw }}
7+
{% endblock %}

0 commit comments

Comments
 (0)