Functions

Functions are applied to the value of the field. They can be also applied to left and right contents. In this case, Lef or Right should be added to the function name and the optional attributes (Not yet implemented in SAV Library Mvc).

Property

Data type

Default

Plus

Mvc

func = makeDateFormat;

None

Yes

No

func = makeEmailLink;

None

Yes

Yes

func = makeExtLink;

None

Yes

No

func = makeImage;

None

Yes

No

func = makeItemLink;

None

Yes

Yes

func = makeLink;

None

Yes

No

func = makeNewWindowLink;

None

Yes

No

func = makeUrlLink;

None

Yes

Yes

func = makeXmlLabel;

None

Yes

No

func = makeDateFormat;

Property

func = makeDateFormat;

Data type

None

Description

This function generates a format for a unix timestamp date.

Optional attributes can be added:

  • format = string; The string should be a format that makes sense for the php-function strftime(). By defaut, %d/%m/%Y and %d/%m/%Y %H:%M are respectively used for date and datetime.

func = makeImage;

Property

func = makeImage;

Data type

None

Description

This function builds an IMG tag where the field value is the name of the image file.

Additional parameter can be used.

  • folder = string; String is the folder where the file should be.

  • width = integer; Width of the image in pixels.

  • height = integer; Height of the image in pixels.

  • alt = string; String is the alt attribute of the image.

  • fieldAlt = field_name; The alt attribute is the value of the fieldname for the current record.

func = makeXmlLabel;

Property

func = makeXmlLabel;

Data type

None

Description

This function generates the label from a xml language file. It works with the following parameters:

  • xmlLabel = string; The string is the label definition. For example, assume that the value comes from a selectorbox whose label definition is in the file locallang_db.xlf in the extension my_ext. Assume also that the field is my_field. Then, to obtain the label one has to write

xmlLabel = LLL:EXT:my_ext/Resources/Private/Language/locallang_db.xlf:tx_myext.my_field.I.;
  • rawValue = 1; The raw alue, i.e. the value stored in the table, is used instead of the rendered one.