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 Feb 22, 2024
1 parent 5e349a7 commit 7ee26d6
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 0 deletions.
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.1",
"ext-ctype": "*",
Expand All @@ -40,6 +46,9 @@
"scheb/2fa-email": "^6.1",
"scheb/2fa-trusted-device": "^6.1",
"stof/doctrine-extensions-bundle": "^1.8",
"sulu/article-bundle": "dev-feature/content-article-repository as 3.0.0",
"sulu/content-bundle": "^0.7.1",
"sulu/messenger": "^0.2.2",
"sulu/sulu": "~2.6.0@dev",
"symfony/config": "^6.3",
"symfony/dotenv": "^6.3",
Expand Down
3 changes: 3 additions & 0 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,7 @@
Sulu\Bundle\ActivityBundle\SuluActivityBundle::class => ['all' => true],
Sulu\Bundle\TrashBundle\SuluTrashBundle::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],
];
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'
4 changes: 4 additions & 0 deletions config/routes/sulu_admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,7 @@ sulu_trash_api:
resource: "@SuluTrashBundle/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>
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 7ee26d6

Please sign in to comment.