-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add components and bundle documentations
- Loading branch information
1 parent
695a1f6
commit a5d79bd
Showing
11 changed files
with
179 additions
and
11 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# CityGov Bundle | ||
|
||
CityGov is a product of Sitepark. The main areas of application of CityGov are the Internet presences of municipalities and district administrations as well as their employee portals on the intranet. | ||
|
||
## Sources | ||
|
||
The sources can be accessed via the GibHub project [https://github.com/sitepark/atoolo-citygov-bundle](https://github.com/sitepark/atoolo-citygov-bundle){:target="\_blank"}. | ||
|
||
## Installation | ||
|
||
Use [Composer](https://getcomposer.org/){:target="\_blank"} to install this component in your PHP project: | ||
|
||
```sh | ||
composer require atoolo/citygov-bundle | ||
``` | ||
|
||
## Extended indexing | ||
|
||
The bundle contains [Document Enricher](../components/search.md#custom-document-enricher), which extends the full-text index for the search with CityGov-specific fields. This allows CityGov-specific searches to be created. |
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,19 @@ | ||
--- | ||
status: draft | ||
--- | ||
|
||
# GraphQL Search Bundle | ||
|
||
The GraphQL Search Bundle uses the functionalities of the [Search component](../components/search.md) and extends the GraphQL interface with the ability to perform searches. | ||
|
||
## Sources | ||
|
||
The sources can be accessed via the GibHub project [https://github.com/sitepark/atoolo-graphql-search-bundle](https://github.com/sitepark/atoolo-graphql-search-bundle){:target="\_blank"}. | ||
|
||
## Installation | ||
|
||
Use [Composer](https://getcomposer.org/){:target="\_blank"} to install this component in your PHP project: | ||
|
||
```sh | ||
composer require atoolo/graphql-search-bundle | ||
``` |
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,19 @@ | ||
# Atoolo Bundles | ||
|
||
Atoolo Bundles are [Symfony Bundles](https://symfony.com/doc/current/bundles.html){:target="\_blank"} that extend Symfony projects with certain Atoolo functionalities. | ||
|
||
## Installation | ||
|
||
Use [Composer](https://getcomposer.org/){:target="\_blank"} to install any of the Atoolo Bundles in your PHP project. | ||
Further information on the installation of Symfony bundles can be found [here](https://symfony.com/doc/current/setup.html#installing-packages){:target="\_blank"}. | ||
|
||
```sh | ||
composer require atoolo/[bundle] | ||
``` | ||
|
||
## All Atoolo Bundles | ||
|
||
| <div style="width:15em">Name</div> | Description | | ||
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| [`atoolo/graphql-search-bundle`](graphql-search.md) | This bundle extends the GraphQL interface with a [search](../graphql/search/index.md). | | ||
| [`atoolo/citygov-bundle`](citygov.md) | CityGov is a product of Sitepark. The main areas of application of CityGov are the Internet presences of municipalities and district administrations as well as their employee portals on the intranet. | |
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,21 @@ | ||
--- | ||
status: draft | ||
--- | ||
|
||
# Security Bundle | ||
|
||
The Atoolo Security Bundle is based on the [Security Bundle](https://symfony.com/components/Security%20Bundle){:target="\_blank"} and contains Atoolo-specific configurations and extensions for a role and user management system that can be maintained via the CMS IES. | ||
|
||
If necessary, it contains the necessary settings to secure individual queries of the GraphQL interface. | ||
|
||
## Sources | ||
|
||
The sources can be accessed via the GibHub project [https://github.com/sitepark/atoolo-security-bundle](https://github.com/sitepark/atoolo-security-bundle){:target="\_blank"}. | ||
|
||
## Installation | ||
|
||
Use [Composer](https://getcomposer.org/){:target="\_blank"} to install this component in your PHP project: | ||
|
||
```sh | ||
composer require atoolo/security-bundle | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
status: draft | ||
--- | ||
|
||
# Search Component | ||
|
||
Provides services with which a Solr index can be filled and searched for [resources](resource.md) via this index. | ||
|
||
## Sources | ||
|
||
The sources can be accessed via the GibHub project [https://github.com/sitepark/atoolo-search](https://github.com/sitepark/atoolo-search){:target="\_blank"}. | ||
|
||
## Installation | ||
|
||
Use [Composer](https://getcomposer.org/){:target="\_blank"} to install this component in your PHP project: | ||
|
||
```sh | ||
composer require atoolo/search | ||
``` | ||
|
||
## Indexing | ||
|
||
### Custom Document Enricher | ||
|
||
Document Enricher allow the document that is passed to Solr for indexing to be enriched with the desired fields. Here it is possible to react to product or customer-specific object types and to set the document according to requirements. | ||
|
||
The document to be filled must adhere to the schema stored in Solr. Only the fields that are known in the schema can be set. Currently the schema `2.1` is used. The implementation `IndexSchema2xDocument` of the `IndexDocument` interface is available for this purpose. The document enricher must implement the interface `DocumentEnricher`. | ||
|
||
```php | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Atoolo\Examples\Search\Indexer\Enricher; | ||
|
||
use Atoolo\Resource\Resource; | ||
use Atoolo\Search\Service\Indexer\DocumentEnricher; | ||
use Atoolo\Search\Service\Indexer\IndexDocument; | ||
use Atoolo\Search\Service\Indexer\IndexSchema2xDocument; | ||
|
||
/** | ||
* @implements DocumentEnricher<IndexSchema2xDocument> | ||
*/ | ||
class CustomDocumentEnricher implements DocumentEnricher | ||
{ | ||
public function isIndexable(Resource $resource): bool | ||
{ | ||
return true; | ||
} | ||
|
||
public function enrichDocument( | ||
Resource $resource, | ||
IndexDocument $doc, | ||
string $processId | ||
): IndexDocument { | ||
if ( | ||
$resource->getObjectType() !== 'myObjectType' | ||
) { | ||
return $doc; | ||
} | ||
|
||
// ... enrich document | ||
|
||
return $doc; | ||
} | ||
} | ||
``` | ||
|
||
The document enricher is required, for example, in the [GraphQL Search Bundle](../bundles/graphql-search.md). This offers a mutation that is also used by the CMS IES to trigger indexing. See also [GraphQl Indexing](../graphql/search/indexing.md). So that your own document enricher can be used, it must be registered as [tagged Symfony service](https://symfony.com/doc/current/service_container/tags.html){:target="\_blank"}. | ||
|
||
`services.yaml` | ||
|
||
```yaml | ||
services: | ||
Atoolo\Examples\Search\Indexer\Enricher\CustomDocumentEnricher: | ||
tags: | ||
- { | ||
name: "atoolo.search.indexer.documentEnricher.schema2x", | ||
priority: 10, | ||
} | ||
``` | ||
|
||
## Searching |
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