CoolCMS API

Renderers

Table of Contents

Interfaces

InlineEditableRenderer
Renderer whose value can be changed inline from the list: the change sends the signal `inlineUpdate!` and saves the new property value to the database (handled in {@see \App\UI\Admin\System\Components\DataGridComponent\Traits\HandleTrait}).

Classes

AssetRenderer
Asset preview; the column value is an {@see Asset} entity (typically `Column::create('asset')->setProperty('asset')`; requires the `asset` include).
BadgeListRenderer
Several badges in one cell (0..N), e.g. the allowed roles of an external Api client.
BadgeRenderer
Substitutes a value with a label and CSS classes for a badge.
BoolRenderer
Yes/no boolean badge (the cell template resolves the translations `admin.general.yes/no`).
CellRenderer
Cell render type. A subclass picks the template (`Templates/Default/Cells/<type>.latte`) and prepares its variables from the column value and the row entity.
ComputedRenderer
Cell computed by a callback over the whole row entity, for derived or aggregated values that are not entity properties (sum of work hours of a sheet, child counts).
DateRenderer
Date without time (default format `j.n.Y`).
DateTimeRenderer
Date and time. The value is a `DateTimeInterface` or a parsable string; the output follows the format (default `j.n.Y H:i`). For date only or time only see {@see DateRenderer} / {@see TimeRenderer}.
EmailRenderer
E-mail address as a clickable link. Without configuration it renders a `mailto:` link (`<a href="mailto:…">`); after {@see setDestination()} it behaves like {@see LinkRenderer} and links to a presenter action (parameters mapped from row properties via {@see setParams()}).
ImageRenderer
Preview image; the property value is a file path or name, an optional `baseUrl` is prepended.
LinkListRenderer
List of related records in one cell (0..N links). Unlike other renderers the column value is an array of entities, not a scalar; the text, tooltip and link parameters are resolved from each item, not from the row entity.
LinkRenderer
Renders the value as a link to a presenter action.
OptionRenderer
Replaces a value with its label from the options (read-only counterpart of {@see SelectRenderer}).
PdfDownloadRenderer
Renders a download icon for a generated PDF.
PdfLinkRenderer
Renders a link to a PDF file: the property value is the file path or name, an optional base URL is prepended. Shows an icon and the file name.
PhoneRenderer
Renders a phone number as a clickable link.
PriceRenderer
Renders a monetary amount.
RelationToggleRenderer
Renders a toggle for a cell whose value lives in a related collection ({@see RelationColumn}), not in a row column.
SelectRenderer
Renders an inline editable select.
TextRenderer
Renders plain text (the default renderer), optionally limited by length (`charLimit`) and by the number of displayed lines (`lineLimit`, a CSS line-clamp).
TimeRenderer
Renders a time without a date (default format `H:i`).
ToggleRenderer
Renders an inline editable switch, an alternative to {@see SelectRenderer} for toggling between two or more states.

Traits

InlineEditableTrait
Shared support of inline editable renderers ({@see InlineEditableRenderer}): the `value => label` map and the target property for saving.
On this page

Search results