You are here

class MailSafetyParamConverter in Mail Safety 8

Class MailSafetyParamConverter.

@package Drupal\mail_safety\ParamConverter

Hierarchy

Expanded class hierarchy of MailSafetyParamConverter

1 string reference to 'MailSafetyParamConverter'
mail_safety.services.yml in ./mail_safety.services.yml
mail_safety.services.yml
1 service uses MailSafetyParamConverter
mail_safety in ./mail_safety.services.yml
Drupal\mail_safety\ParamConverter\MailSafetyParamConverter

File

src/ParamConverter/MailSafetyParamConverter.php, line 15

Namespace

Drupal\mail_safety\ParamConverter
View source
class MailSafetyParamConverter implements ParamConverterInterface {

  /**
   * {@inheritdoc}
   */
  public function convert($mail_id, $definition, $name, array $defaults) {
    return MailSafetyController::load($mail_id);
  }

  /**
   * {@inheritdoc}
   */
  public function applies($definition, $name, Route $route) {
    return !empty($definition['type']) && $definition['type'] == 'mail_safety';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MailSafetyParamConverter::applies public function Determines if the converter applies to a specific route and variable. Overrides ParamConverterInterface::applies
MailSafetyParamConverter::convert public function Converts path variables to their corresponding objects. Overrides ParamConverterInterface::convert