Skip to content
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
Thumbs.db
.DS_Store
.sass-cache
vendor
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ This bundle allows to assign nestable categories to arbitrary entities in Contao
- the module is done in a generic way, i.e. you can assign category/categories field(s) to arbitrary DCAs
- conveniently add single category fields (radio button) or multiple categories fields (checkbox) via a simple function call
- specify overridable properties in categories and compute the correct result depending on the given context easily
- multilanguage support via [heimrichhannot/contao-categories-multilingual-bundle](https://github.com/heimrichhannot/contao-categories-multilingual-bundle)
- categories filter type for [Contao Filter Bundle](https://github.com/heimrichhannot/contao-filter-bundle)
- [DC_Multilingual](https://github.com/terminal42/contao-DC_Multilingual) support
- [Flare Bundle](https://github.com/heimrichhannot/contao-flare-bundle) support

## Impressions

Expand Down Expand Up @@ -57,6 +57,19 @@ This bundle comes with two filter types:
- CategoryChoiceType let you select categories to filter a list.
- ParentCategoryChoiceType is an inital filter to filter your list based on a parent category (means all elements are in a child category of the selected parent).

### DC_Multilingual

This bundle is prepared to work with DC_Multilingual.
If you have DC_Multilingual installed, you'll only have to activate it by setting the translatable languages for the tl_category table.

Example:

```php
$dca['config']['languages'] = ['de', 'en', 'pl'];
# Optional: set fallback language (default is en)
$dca['config']['fallbackLang'] = 'de';
```

## Entity structure

![alt entities](docs/entities.png)
Expand Down
63 changes: 32 additions & 31 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
{
"name": "heimrichhannot/contao-categories-bundle",
"type": "contao-bundle",
"description": "This bundle allows to assign nestable categories to arbitrary entities in Contao-driven systems.",
"license": "LGPL-3.0-or-later",
"require": {
"php": "^7.4 || ^8.0",
"contao/core-bundle": "^4.4",
"heimrichhannot/contao-utils-bundle": "^2.210",
"heimrichhannot/contao-multi-column-editor-bundle": "^2.0",
"wa72/htmlpagedom": "^1.3 || ^2.0",
"heimrichhannot/contao-request-bundle": "^1.0"
},
"autoload": {
"psr-4": {
"HeimrichHannot\\CategoriesBundle\\": "src/"
"name": "heimrichhannot/contao-categories-bundle",
"type": "contao-bundle",
"description": "This bundle allows to assign nestable categories to arbitrary entities in Contao-driven systems.",
"license": "LGPL-3.0-or-later",
"require": {
"php": "^8.2",
"contao/core-bundle": "^5.3",
"heimrichhannot/contao-utils-bundle": "^3.9",
"heimrichhannot/contao-multi-column-editor-bundle": "^2.0",
"wa72/htmlpagedom": "^3.0"
},
"classmap": [
"src/"
],
"exclude-from-classmap": [
"src/Resources/contao/config/",
"src/Resources/contao/dca/",
"src/Resources/contao/languages/",
"src/Resources/contao/templates/"
]
},
"extra": {
"contao-manager-plugin": "HeimrichHannot\\CategoriesBundle\\ContaoManager\\Plugin"
},
"suggest": {
"heimrichhannot/contao-categories-multilingual-bundle": "Adds multilanguage support for categories bundle."
}
"autoload": {
"psr-4": {
"HeimrichHannot\\CategoriesBundle\\": "src/"
}
},
"extra": {
"contao-manager-plugin": "HeimrichHannot\\CategoriesBundle\\ContaoManager\\Plugin"
},
"suggest": {
"heimrichhannot/contao-categories-multilingual-bundle": "Adds multilanguage support for categories bundle."
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Da könnte auch noch flare rein, oder? @koertho

},
"require-dev": {
"rector/rector": "^2.2",
"contao/contao-rector": "dev-main",
"symplify/easy-coding-standard": "^12.6",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-symfony": "^2.0",
"contao/manager-plugin": "^2.13"
},
"conflict": {
"heimrichhannot/contao-categories-multilingual-bundle": "*"
}
}
Loading