You are here

class ContactFormRevisionsConverter in Config Entity Revisions 8.2

Same name in this branch
  1. 8.2 modules/contact_form_revisions/src/ParamConverter/ContactFormRevisionsConverter.php \Drupal\contact_form_revisions\ParamConverter\ContactFormRevisionsConverter
  2. 8.2 modules/contact_form_revisions/src/ProxyClass/ParamConverter/ContactFormRevisionsConverter.php \Drupal\contact_form_revisions\ProxyClass\ParamConverter\ContactFormRevisionsConverter

Provides upcasting for a contact entity, with revisions support.

Example:

pattern: '/some/{contact_form}/{revision_id}/and/{bar}' options: parameters: contact_form: type: 'entity:contact_form' tempstore: TRUE revision_id: \+d

The value for {contact_form} will be converted to a contact entity prepared for the Contact UI and loaded from the contact temp store, but it will not touch the value for {bar}.

This class extends AdminPathConfigEntityConverter rather than ContactUIConverter so that ContactUIConverter's converter can be replaced rather than extended (we call the parent method). Other methods should remain the same as ContactUIConverter.

Hierarchy

Expanded class hierarchy of ContactFormRevisionsConverter

1 string reference to 'ContactFormRevisionsConverter'
contact_form_revisions.services.yml in modules/contact_form_revisions/contact_form_revisions.services.yml
modules/contact_form_revisions/contact_form_revisions.services.yml
1 service uses ContactFormRevisionsConverter
paramconverter.contact_form_revisions in modules/contact_form_revisions/contact_form_revisions.services.yml
Drupal\contact_form_revisions\ParamConverter\ContactFormRevisionsConverter

File

modules/contact_form_revisions/src/ParamConverter/ContactFormRevisionsConverter.php, line 32

Namespace

Drupal\contact_form_revisions\ParamConverter
View source
class ContactFormRevisionsConverter extends ConfigEntityRevisionsConverterBase implements ParamConverterInterface {

}

Members

Namesort descending Modifiers Type Description Overrides
AdminPathConfigEntityConverter::$adminContext protected property The route admin context to determine whether a route is an admin one.
AdminPathConfigEntityConverter::$configFactory protected property The config factory.
AdminPathConfigEntityConverter::applies public function Determines if the converter applies to a specific route and variable. Overrides EntityConverter::applies 1
ConfigEntityRevisionsConverterBase::$tempStoreFactory protected property Stores the tempstore factory.
ConfigEntityRevisionsConverterBase::containerFor protected function Default implementation of containerFor - the container is the object. 1
ConfigEntityRevisionsConverterBase::convert public function Converts path variables to their corresponding objects. Overrides AdminPathConfigEntityConverter::convert
ConfigEntityRevisionsConverterBase::getEntityTypeFromDefaults public function Determines the entity type ID given a route definition and route defaults. Overrides DynamicEntityTypeParamConverterTrait::getEntityTypeFromDefaults
ConfigEntityRevisionsConverterBase::tempstorePrefix protected function A prefix for tempstore keys - empty if tempstore is not used. 1
ConfigEntityRevisionsConverterBase::__construct public function Constructs a new converter. Overrides AdminPathConfigEntityConverter::__construct
DeprecatedServicePropertyTrait::__get public function Allows to access deprecated/removed properties.
EntityConverter::$deprecatedProperties protected property
EntityConverter::$entityRepository protected property Entity repository.
EntityConverter::$entityTypeManager protected property Entity type manager which performs the upcasting in the end.
EntityConverter::getLatestTranslationAffectedRevision Deprecated protected function Returns the latest revision translation of the specified entity.
EntityConverter::languageManager protected function Returns a language manager instance.
EntityConverter::loadRevision Deprecated protected function Loads the specified entity revision.