You are here

public function MassContactConfirmConverter::convert in Mass Contact 8

Converts path variables to their corresponding objects.

Parameters

mixed $value: The raw value.

mixed $definition: The parameter definition provided in the route options.

string $name: The name of the parameter.

array $defaults: The route defaults array.

Return value

mixed|null The converted parameter value.

Overrides ParamConverterInterface::convert

File

src/ParamConverter/MassContactConfirmConverter.php, line 34

Class

MassContactConfirmConverter
Provides upcasting information for mass contact email info to a confirm form.

Namespace

Drupal\mass_contact\ParamConverter

Code

public function convert($value, $definition, $name, array $defaults) {
  $store = $this->tempStoreFactory
    ->get('mass_contact_confirm_info');
  if ($mass_contact_message_info = $store
    ->get($value)) {
    return $mass_contact_message_info;
  }
}