The class ModelId implements the ModelIdInterface.

It is the successor of the previous used ModelIdSerializer in the Contao2BackendView.

 Methods

Construct.

__construct(string $dataProviderName, mixed $modelId) 

Parameters

$dataProviderName

string

The data provider name.

$modelId

mixed

The model id.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralInvalidArgumentException If an invalid data provider name or model id is given.

{@inheritdoc}

equals(\ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $modelId) 

Parameters

$modelId

{@inheritdoc}

fromModel(\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $model) 
Static

Parameters

$model

{@inheritdoc}

fromSerialized($serialized) 
Static

Parameters

$serialized

Exceptions

\ContaoCommunityAlliance\DcGeneral\Exception\DcGeneralRuntimeException When the id is unparsable.

{@inheritdoc}

fromValues($dataProviderName, $modelId) 
Static

Parameters

$dataProviderName

$modelId

Retrieve the data provider name.

getDataProviderName() : string

Returns

string

{@inheritdoc}

getId() 

Serialize the id.

getSerialized() : string

Returns

string

 Properties

 

The data provider name.

$dataProviderName : string
 

The id of the model.

$modelId : mixed