-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/sulu/SuluArticleBundle
- Loading branch information
Showing
11 changed files
with
341 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ disabled: | |
- phpdoc_indent | ||
- phpdoc_to_comment | ||
- blankline_after_open_tag | ||
- single_line_class_definition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,121 +1,50 @@ | ||
# SuluArticleBundle | ||
|
||
[![Build Status](https://travis-ci.org/sulu/SuluArticleBundle.svg?branch=master)](https://travis-ci.org/sulu/SuluArticleBundle) | ||
[![StyleCI](https://styleci.io/repos/61883398/shield?branch=develop)](https://styleci.io/repos/61883398) | ||
|
||
The SuluArticleBundle adds support for managing articles in Sulu. Articles can be used in a lot of different ways to | ||
manage unstructured data with an own URL in an admin-list. Most of the features, which can be used in pages, can also | ||
be used on articles - like templates, versioning, drafting, publishing and automation. | ||
|
||
Additional features included: | ||
|
||
* Build in view-layer with elasticsearch | ||
* Segmentation of article-templates (called article-types) | ||
* Define URL schemas per type | ||
|
||
## Status | ||
|
||
This repository will become version 1.0 of SuluArticleBundle. It is under **heavy development** and currently its APIs | ||
and code are not stable yet (pre 1.0). | ||
|
||
## Requirements | ||
|
||
* Composer | ||
* PHP `^5.5 || ^7.0` | ||
* Sulu `^1.4` | ||
* Elasticsearch `^2.2` | ||
|
||
For detailed requirements see [composer.json](https://github.com/sulu/SuluArticleBundle/blob/master/composer.json). | ||
|
||
## Documentation | ||
|
||
The the Documentation is stored in the | ||
[Resources/doc/](https://github.com/sulu/SuluArticleBundle/blob/master/Resources/doc) folder. | ||
|
||
## Installation | ||
|
||
Install ElasticSearch | ||
|
||
Install bundle over composer: | ||
|
||
```bash | ||
composer require sulu/article-bundle | ||
``` | ||
|
||
Possible bundle configurations: | ||
|
||
```yml | ||
sulu_article: | ||
documents: | ||
article: | ||
view: Sulu\Bundle\ArticleBundle\Document\ArticleViewDocument | ||
types: | ||
|
||
# Prototype | ||
name: | ||
translation_key: ~ | ||
|
||
# Display tab 'all' in list view | ||
display_tab_all: true | ||
``` | ||
Configure the bundles: | ||
```yml | ||
sulu_route: | ||
mappings: | ||
Sulu\Bundle\ArticleBundle\Document\ArticleDocument: | ||
generator: schema | ||
options: | ||
route_schema: /articles/{object.getTitle()} | ||
|
||
sulu_core: | ||
content: | ||
structure: | ||
default_type: | ||
article: "article_default" | ||
paths: | ||
article: | ||
path: "%kernel.root_dir%/Resources/templates/articles" | ||
type: "article" | ||
|
||
ongr_elasticsearch: | ||
connections: | ||
default: | ||
index_name: su_articles | ||
live: | ||
index_name: su_articles_live | ||
managers: | ||
default: | ||
connection: default | ||
mappings: | ||
- SuluArticleBundle | ||
live: | ||
connection: live | ||
mappings: | ||
- SuluArticleBundle | ||
``` | ||
Add xml template for structure in configured folder: | ||
``` | ||
%kernel.root_dir%/Resources/templates/articles/article_default.xml | ||
``` | ||
|
||
Example is located in Bundle: | ||
|
||
``` | ||
Resources/doc/article_default.xml | ||
``` | ||
|
||
Add template for article type in configured folder: | ||
|
||
``` | ||
%kernel.root_dir%/Resources/views/articles/article_default.html.twig | ||
``` | ||
|
||
Example is located in Bundle: | ||
|
||
``` | ||
Resources/doc/article_default.html.twig | ||
``` | ||
|
||
Configure the routing | ||
|
||
```yml | ||
sulu_arictle_api: | ||
resource: "@SuluArticleBundle/Resources/config/routing_api.xml" | ||
type: rest | ||
prefix: /admin/api | ||
|
||
sulu_article: | ||
resource: "@SuluArticleBundle/Resources/config/routing.xml" | ||
prefix: /admin/articles | ||
``` | ||
Add bundle to AbstractKernel: | ||
```php | ||
new Sulu\Bundle\ArticleBundle\SuluArticleBundle(), | ||
new ONGR\ElasticsearchBundle\ONGRElasticsearchBundle(), | ||
``` | ||
|
||
Create required phpcr nodes: | ||
|
||
```bash | ||
bin/console sulu:document:init | ||
``` | ||
|
||
Create elasticsearch index: | ||
|
||
```bash | ||
bin/console ongr:es:index:create | ||
``` | ||
All the installation instructions are located in the | ||
[Documentation](https://github.com/sulu/SuluArticleBundle/blob/master/Resources/doc/installation.md). | ||
|
||
## License | ||
|
||
This bundle is under the MIT license. See the complete license [in the bundle](LICENSE) | ||
|
||
## Reporting an issue or a feature request | ||
|
||
Issues and feature requests are tracked in the [Github issue tracker](https://github.com/Sulu/SuluArticleBundle/issues). | ||
|
||
When reporting a bug, it may be a good idea to reproduce it in a basic project built using the | ||
[Sulu Minimal Edition](https://github.com/sulu/sulu-minimal) to allow developers of the bundle to reproduce the issue | ||
by simply cloning it and following some steps. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> | ||
<parameters> | ||
<parameter key="sulu_article.article_document.class">Sulu\Bundle\ArticleBundle\Document\ArticleDocument</parameter> | ||
</parameters> | ||
|
||
<services> | ||
<service id="sulu_article.automation.content_navigation_provider" | ||
class="Sulu\Bundle\AutomationBundle\Admin\AutomationContentNavigationProvider"> | ||
<argument type="service" id="sulu_security.security_checker"/> | ||
<argument type="service" id="sulu.repository.task"/> | ||
<argument type="string">%sulu_article.article_document.class%</argument> | ||
|
||
<tag name="sulu_admin.content_navigation" alias="article"/> | ||
<tag name="sulu.context" context="admin"/> | ||
</service> | ||
</services> | ||
</container> |
Oops, something went wrong.