public interface ImportableField

interface.importablefield.php #14

The ImportableField interface defines the functions required to implement the field import API.

Constants

static integer ARRAY_VALUE = 1101

Select raw values from a field, usually as an associative array that processRawFieldData would generate.

static integer STRING_VALUE = 1100

Prepare a string for a field, oriented towards the human readable.

Methods

array getImportModes()

Return a list of supported import modes for use with prepareImportValue.

array|string prepareImportValue(mixed $data, integer $mode, integer $entry_id)

Give the field some data and ask it to return a value.

Parameters
  • $data mixedThe data to sanitise/prepare so that it can be added to Symphony.

  • $mode integerThe $mode dictates how this function should return it's value. Prior to Symphony 2.3.1, the pseudo implementation of this function returned strings, whereas in Symphony 2.3.1 the function returned arrays. $mode toggles between these two return types (for now)

  • $entry_id integerIf there is an existing entry that this value is being imported into, the $entry_id can allow the field to do additional processing/checking

Returns

Dependent on the $mode

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details