Feature: Configurable document rows and actions
Description
Every entry below
document in
Configuration/ - the seven timeline entry
types and the contracts - declares what a compact row of that list shows and
which actions it offers:
documentSections:
publications:
label: 'LLL:EXT:academic_persons/Resources/Private/Language/locallang_tca.xlf:tx_academicpersons_domain_model_profile.columns.publications.label'
type: publication
fieldName: publications
rowFields:
- year
- title
actions:
- hide
- view
- down
- up
- delete
- edit
row is the ordered list of values a row renders. Timeline
entries support from, to, year, title and description;
the contracts support from, to and position.
actions
is
the ordered list of per-row actions: hide, view, down, up,
delete and edit. An action that is not listed is not offered, and listing both
up and down is what enables drag-and-drop sorting of the list.
A section marked
readonly: true
offers view and nothing else,
whatever its
actions
list says, and does not allow creating a record.
Unknown values and duplicates in either list are discarded; both lists are
matched without regard to case.
The typed
\FGTCLB\ carries the
normalised lists and answers the capability questions -
allows,
get,
allows
and
allows - so the editing frontend of
fgtclb/academic-persons-edit
renders and offers exactly what the
file declares.
The lists are enforced on both sides. The rendered buttons come from them, and
so does the answer of every write endpoint of the editing frontend: an action a
section does not list is refused with HTTP 403 no matter how the request was
made. That includes the addresses, e-mail addresses and phone numbers of a
contract, which have no section of their own and follow the
actions
list and the
readonly
flag of the contracts section.
The shipped timeline descriptions declare editor.type: ckeditor, which
marks the field as rich text (the html flag) and carries a readable-text
limit of 500 characters, so the editing frontend renders the rich text editor
and enforces the limit with the same sanitisation contract as the rich text
fields of the profile.
Impact
The shipped sections list every row field and action that makes sense for
them. A site package that overrides
document restates the two
lists for every section it declares - a section without
actions
offers no action at all. Flush the TYPO3 caches after changing the file.