Skip to content

Commit

Permalink
Revise doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jjuenger committed Dec 20, 2024
1 parent 5a0f982 commit d051aa1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
Binary file modified docs/assets/img/classes-widget-basedocumentmodel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 17 additions & 14 deletions docs/backend/view.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,25 @@ Templates for the project databases are located in the `plugins/Epi/templates` d
Shared rendering logic is encapsulated in helper classes, which are located in the `src/View/Helper` directory
on the application level and in the plugin folders.

Supports rendering of entity collections in tables:
- TableHelper
- TreeHelper

Supports rendering of entities and their fields:
- BaseEntityHelper
- EntityHtmlHelper
- EntityInputHelper
- EntityMarkdownHelper
Support for rendering of entity collections in tables:
- **TableHelper**: Generates tables for entities, entity collections and arrays.
- **TreeHelper**: Generates tree markup, e.g. for categories. The helper supports trees for selecting entities.
Can be used in combination with the table helper to add tree markup to tables.

Support for rendering of entities and their fields:
- **BaseEntityHelper**: The class is central to rendering entities.
Its function `entityForm()` is called to view entities and to create input forms.
Its function `sectionList()` is called for generating documents such as articles.
- **EntityHtmlHelper**: Derives from BaseEntityHelper helper for markup specific to non-editing HTML output for entities.
- **EntityInputHelper**: Derives from BaseEntityHelper helper for form input generation when editing entities.
- **EntityMarkdownHelper**: Derives from BaseEntityHelper helper and overrides functions for Markdown rendering.

Utilities for rendering HTML elements:
- ElementHelper
- LinkHelper
- MenuHelper
- FilesHelper
- TypesHelper
- **ElementHelper**: Provides basic functions for creating HTML tags.
- **LinkHelper**: Generates links and buttons.
- **MenuHelper**: Generates different kinds of menus with the function `renderMenu()`.
- **FilesHelper**: Supports uploading files, displaying previews and thumbnails.
- **TypesHelper**: Provides access to the types configuration.

## Rendering API Data

Expand Down
2 changes: 1 addition & 1 deletion docs/frontend/widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Both are descendants of the `BaseForm` class supporting features for saving data
![Inheritance hierarchy](../assets/img/classes-widget-basedocumentmodel.png)

The `EntityWidget` is used for simple entities, usually displayed in a vertical table.
It inherits all methods and properties from the base from widget
It inherits all methods and properties from `BaseForm`
and does not provide any additional functionality.

The `DocumentWidget` is used for more complex data,
Expand Down

0 comments on commit d051aa1

Please sign in to comment.