The class IdSerializer provides handy methods to serialize and un-serialize model ids including the data provider name into a string.

It is the successor of the previous used ModelIdSerializer in the Contao2BackendView.
deprecated This class gonna be replaced by the ModelId. Use this instead!
see
see

 Methods

Construct.

__construct(string $dataProviderName, mixed $modelId) 

Parameters

$dataProviderName

string

The data provider name.

$modelId

mixed

The model id.

Determine if both, data provider name and id are set and non empty.

isValid() : bool

Returns

bool

Set the data provider name.

setDataProviderName(string $dataProviderName) : \ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\IdSerializer

Parameters

$dataProviderName

string

The name.

Returns