Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Add development branch with the new PageBundle, ArticleBundle, SnippetBundle #275

Draft
wants to merge 1 commit into
base: 3.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .php-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8.3
8 changes: 7 additions & 1 deletion 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": "https://github.com/Prokyonn/sulu.git"
}
],
"require": {
"php": "^8.2",
"ext-ctype": "*",
Expand All @@ -41,7 +47,7 @@
"scheb/2fa-email": "^7.2",
"scheb/2fa-trusted-device": "^7.2",
"stof/doctrine-extensions-bundle": "^1.11",
"sulu/sulu": "^3.0.x-dev",
"sulu/sulu": "dev-feature/page-bundle as 3.0",
"symfony/config": "^7.2",
"symfony/dotenv": "^7.2",
"symfony/flex": "^1.17 || ^2.0",
Expand Down
6 changes: 5 additions & 1 deletion config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
Sulu\Bundle\MediaBundle\SuluMediaBundle::class => ['all' => true],
Sulu\Bundle\SecurityBundle\SuluSecurityBundle::class => ['all' => true],
Sulu\Bundle\CategoryBundle\SuluCategoryBundle::class => ['all' => true],
Sulu\Bundle\SnippetBundle\SuluSnippetBundle::class => ['all' => true],
Sulu\Bundle\PageBundle\SuluPageBundle::class => ['all' => true],
Sulu\Bundle\TagBundle\SuluTagBundle::class => ['all' => true],
Sulu\Bundle\WebsiteBundle\SuluWebsiteBundle::class => ['all' => true],
Expand All @@ -46,4 +45,9 @@
Sulu\Bundle\ReferenceBundle\SuluReferenceBundle::class => ['all' => true],
Scheb\TwoFactorBundle\SchebTwoFactorBundle::class => ['all' => true],
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
Sulu\Content\Infrastructure\Symfony\HttpKernel\SuluContentBundle::class => ['all' => true],
Sulu\Messenger\Infrastructure\Symfony\HttpKernel\SuluMessengerBundle::class => ['all' => true],
Sulu\Article\Infrastructure\Symfony\HttpKernel\SuluArticleBundle::class => ['all' => true],
Sulu\Snippet\Infrastructure\Symfony\HttpKernel\SuluSnippetBundle::class => ['all' => true],
Sulu\Page\Infrastructure\Symfony\HttpKernel\SuluPageBundle::class => ['all' => true],
];
7 changes: 7 additions & 0 deletions config/packages/sulu_article.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sulu_article: {}

sulu_core:
content:
structure:
default_type:
article: 'article'
20 changes: 16 additions & 4 deletions config/routes/sulu_admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ sulu_category_api:
resource: "@SuluCategoryBundle/Resources/config/routing_api.yml"
prefix: /admin/api

sulu_snippet_api:
resource: "@SuluSnippetBundle/Resources/config/routing_api.yml"
type: rest
prefix: /admin/api
#sulu_snippet_api:
# resource: "@SuluSnippetBundle/Resources/config/routing_api.yml"
# type: rest
# prefix: /admin/api

sulu_location:
resource: "@SuluLocationBundle/Resources/config/routing.yml"
Expand Down Expand Up @@ -112,3 +112,15 @@ sulu_reference_api:
resource: "@SuluReferenceBundle/Resources/config/routing_api.yml"
type: rest
prefix: /admin/api

sulu_article_api:
resource: "@SuluArticleBundle/config/routing_admin_api.yaml"
prefix: /admin/api

sulu_snippet_api:
resource: "@SuluSnippetBundle/config/routing_admin_api.yaml"
prefix: /admin/api

sulu_next_page_api:
resource: "@SuluNextPageBundle/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\Content\UserInterface\Controller\Website\ContentController::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>
102 changes: 99 additions & 3 deletions config/templates/pages/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<key>default</key>

<view>pages/default</view>
<controller>Sulu\Bundle\WebsiteBundle\Controller\DefaultController::indexAction</controller>
<controller>Sulu\Content\UserInterface\Controller\Website\ContentController::indexAction</controller>
<cacheLifetime>604800</cacheLifetime>

<meta>
Expand All @@ -27,7 +27,7 @@
<tag name="sulu.rlp.part"/>
</property>

<property name="url" type="resource_locator" mandatory="true">
<property name="url" type="route">
<meta>
<title lang="en">Resourcelocator</title>
<title lang="de">Adresse</title>
Expand All @@ -36,11 +36,107 @@
<tag name="sulu.rlp"/>
</property>

<property name="article" type="text_editor">
<property name="editor" type="text_editor">
<meta>
<title lang="en">Article</title>
<title lang="de">Artikel</title>
</meta>
</property>

<property name="date" type="date">
<meta>
<title lang="en">Date</title>
<title lang="de">Datum</title>
</meta>
</property>

<property name="datetime" type="datetime">
<meta>
<title lang="en">Datetime</title>
<title lang="de">Datum und Uhrzeit</title>
</meta>
</property>

<property name="snippet" type="single_snippet_selection">
<meta>
<title lang="en">Snippet</title>
<title lang="de">Schnipsel</title>
</meta>
</property>

<property name="snippets" type="snippet_selection">
<meta>
<title lang="en">Snippets</title>
<title lang="de">Schnipsel</title>
</meta>
</property>

<property name="page" type="single_page_selection">
<meta>
<title lang="en">Page</title>
<title lang="de">Seite</title>
</meta>
</property>

<property name="pages" type="page_selection">
<meta>
<title lang="en">Page</title>
<title lang="de">Seite</title>
</meta>
</property>

<property name="location" type="location">
<meta>
<title lang="en">Location</title>
<title lang="de">Ort</title>
</meta>
</property>

<block name="blocks" default-type="editor" minOccurs="1" maxOccurs="1">
<meta>
<title lang="en">Content</title>
<title lang="de">Inhalte</title>
</meta>

<types>
<type name="editor">
<meta>
<title lang="en">Editor</title>
<title lang="de">Editor</title>
</meta>
<properties>
<property name="text_editor" type="text_editor">
<meta>
<title lang="en">Text Editor</title>
<title lang="de">Texteditor</title>
</meta>
</property>
</properties>
</type>
<type name="media">
<meta>
<title lang="de">Media</title>
<title lang="en">Media</title>
</meta>
<properties>
<property name="media_selection" type="media_selection">
<meta>
<title lang="en">Media Selection</title>
<title lang="de">Medienauswahl</title>
</meta>
<params>
<param name="types" value="image,video"/>
<param name="displayOptions" type="collection">
<param name="leftTop" value="true"/>
<param name="top" value="true"/>
</param>

<param name="defaultDisplayOption" value="left"/>
</params>
</property>
</properties>
</type>
</types>
</block>
</properties>
</template>
2 changes: 1 addition & 1 deletion config/templates/pages/homepage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<key>homepage</key>

<view>pages/homepage</view>
<controller>Sulu\Bundle\WebsiteBundle\Controller\DefaultController::indexAction</controller>
<controller>Sulu\Content\UserInterface\Controller\Website\ContentController::indexAction</controller>
<cacheLifetime>86400</cacheLifetime>

<meta>
Expand Down
9 changes: 0 additions & 9 deletions public/build/admin/main.6ac266f08e2c460021aa.js

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions public/build/admin/main.83040a089a74dff3169f.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions public/build/admin/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"main.css": "/build/admin/main.6ac266f08e2c460021aa.css",
"main.js": "/build/admin/main.6ac266f08e2c460021aa.js",
"main.css": "/build/admin/main.83040a089a74dff3169f.css",
"main.js": "/build/admin/main.83040a089a74dff3169f.js",
"fa-solid-900.svg": "/build/admin/fa-solid-900.7a8b4f130182d19a2d7c.svg",
"fa-brands-400.svg": "/build/admin/fa-brands-400.2f517e09eb2ca6650ff5.svg",
"fa-solid-900.eot": "/build/admin/fa-solid-900.9bbb245e67a133f6e486.eot",
Expand Down Expand Up @@ -77,6 +77,6 @@
"images/layers.png": "/build/admin/images/layers.416d91365b44e4b4f477.png",
"images/marker-shadow.png": "/build/admin/images/marker-shadow.a0c6cc1401c107b501ef.png",
"images/checkerBackground.gif": "/build/admin/images/checkerBackground.9883f9a87851b3f982e6.gif",
"main.css.map": "/build/admin/main.6ac266f08e2c460021aa.css.map",
"main.js.map": "/build/admin/main.6ac266f08e2c460021aa.js.map"
"main.css.map": "/build/admin/main.83040a089a74dff3169f.css.map",
"main.js.map": "/build/admin/main.83040a089a74dff3169f.js.map"
}
9 changes: 9 additions & 0 deletions templates/articles/article.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% extends "base.html.twig" %}

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

{{ content.article|raw }}

{{ dump() }}
{% endblock %}
2 changes: 1 addition & 1 deletion templates/pages/default.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
{% block content %}
<h1>{{ content.title }}</h1>

{{ content.article|raw }}
{{ dump() }}
{% endblock %}
Loading