Contao Utils Bundle

DcaUtil
in package

Table of Contents

Properties

$contaoFramework  : ContaoFramework

Methods

__construct()  : mixed
executeCallback()  : mixed
explodePalette()  : array<string|int, mixed>
Explode a palette string.
getDcaFields()  : array<string|int, mixed>
Return a list of dca fields for given table.
getPaletteFields()  : array<string|int, mixed>
Return all fields of a palette including its subpalettes as array.

Properties

$contaoFramework

private ContaoFramework $contaoFramework

Methods

__construct()

public __construct(ContaoFramework $contaoFramework) : mixed
Parameters
$contaoFramework : ContaoFramework

executeCallback()

public executeCallback(array<string|int, mixed>|callable|null $callback, mixed ...$arguments) : mixed
Parameters
$callback : array<string|int, mixed>|callable|null
$arguments : mixed

explodePalette()

Explode a palette string.

public explodePalette(string $palette) : array<string|int, mixed>
Parameters
$palette : string
Return values
array<string|int, mixed>

getDcaFields()

Return a list of dca fields for given table.

public getDcaFields(string $table[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>

Fields can be filtered by given options.

Options:

  • onlyDatabaseFields (bool): Return only fields with sql definition. Default false
  • allowedInputTypes (array): Return only fields of given types.
  • evalConditions (array): Return only fields with given eval key-value-pairs.
  • localizeLabels (bool): Return also the field labels (key = field name, value = field label). Default false
  • skipSorting (bool): Skip sorting fields by field name alphabetical. Default false
Parameters
$table : string
$options : array<string|int, mixed> = []
Return values
array<string|int, mixed>

getPaletteFields()

Return all fields of a palette including its subpalettes as array.

public getPaletteFields(string $table, string $palette[, array<string|int, mixed> $options = [] ]) : array<string|int, mixed>

Options:

  • skip_subpalettes (bool): Don't add subpalette fields to result.
Parameters
$table : string
$palette : string
$options : array<string|int, mixed> = []
Return values
array<string|int, mixed>

        
On this page

Search results