Class TableRowsAsRecordsDataProvider.

This data provider allows to map multiple rows of a SQL table into a single model for usage in a MultiColumnWizard.

 Methods

Unsupported in this data provider, throws an Exception.

delete(mixed $item) : void
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

$item

mixed

Unused.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException Always throws exception.

Fetch a single record by id.

fetch(\ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface $objConfig) : \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface
This data provider only supports retrieving by id so use $objConfig->setId() to populate the config with an Id.

Parameters

$objConfig

\ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface

The configuration to use.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException If config object does not contain an Id.

Returns

Unsupported in this data provider, throws an Exception.

fetchAll(\ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface $objConfig) : void
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException Always throws exception.

Check if the property exists in the table.

fieldExists(string $strField) : boolean
This data provider only returns true for the tstamp property.

Parameters

$strField

string

The name of the property to check.

Returns

boolean

Unsupported in this data provider, throws an Exception.

getActiveVersion(mixed $mixID) : void
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

$mixID

mixed

Unused.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException Always throws exception.

Unsupported in this data provider, throws an Exception.

getCount(\ContaoCommunityAlliance\DcGeneral\Data\ConfigInterface $objConfig) : void
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException Always throws exception.

Unsupported in this data provider, throws an Exception.

getVersion(mixed $mixID, mixed $mixVersion) : void
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

$mixID

mixed

Unused.

$mixVersion

mixed

Unused.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException Always throws exception.

Return null as versioning is not supported in this data provider.

getVersions(mixed $mixID, boolean $blnOnlyActive) : null
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

$mixID

mixed

Unused.

$blnOnlyActive

boolean

Unused.

Returns

null

Unsupported in this data provider, throws an Exception.

isUniqueValue(string $strField, mixed $varNew, int $intId) : void
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

$strField

string

Unused.

$varNew

mixed

Unused.

$intId

int

Unused.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException Always throws exception.

Unsupported in this data provider, throws an Exception.

resetFallback(string $strField) : void
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

$strField

string

Unused.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException Always throws exception.

Unsupported in this data provider, throws an Exception.

sameModels(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $objModel1, \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $objModel2) : void
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException Always throws exception.

Save a model to the database.

save(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $objItem, bool $recursive) : \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface
In general, this method fetches the solely property "rows" from the model and updates the local table against these contents. The parent id (id of the model) will get checked and reflected also for new items. When rows with duplicate ids are encountered (like from MCW for example), the dupes are inserted as new rows.
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

$recursive

bool

Ignored as not relevant in this data provider.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException When the passed model does not contain a property named "rows", an Exception is thrown.

Returns

Unsupported in this data provider, throws an Exception.

saveEach(\ContaoCommunityAlliance\DcGeneral\Data\CollectionInterface $objItems) : void
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException Always throws exception.

Unsupported in this data provider, throws an Exception.

saveVersion(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $objModel, string $strUsername) : void
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

$strUsername

string

Unused.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException Always throws exception.

Set base config with source and other necessary parameter.

setBaseConfig(array $arrConfig) : void

Parameters

$arrConfig

array

The configuration to use.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException When no source has been defined.

Unsupported in this data provider, throws an Exception.

setVersionActive(mixed $mixID, mixed $mixVersion) : void
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

$mixID

mixed

Unused.

$mixVersion

mixed

Unused.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException Always throws exception.

Unsupported in this data provider, throws an Exception.

insertUndo(string $strSourceSQL, string $strSaveSQL, string $strTable) : void
SuppressWarnings (PHPMD.UnusedFormalParameter)

Parameters

$strSourceSQL

string

Unused.

$strSaveSQL

string

Unused.

$strTable

string

Unused.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException Always throws exception.

Exception throwing convenience method.

youShouldNotCallMe(string $strMethod) : void
Convenience method in this data provider that simply throws an Exception stating that the passed method name should not be called on this data provider, as it is only intended to display an edit mask.

Parameters

$strMethod

string

The name of the method being called.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralException Throws always an exception telling that the method (see param $strMethod) must not be called.

 Properties

 

Grouping column to use to tie rows together.

$strGroupCol : string
 

Sorting column to sort the entries by.

$strSortCol : string