ContactFormRevisionsController.php in Config Entity Revisions 8.2
Namespace
Drupal\contact_form_revisions\ControllerFile
modules/contact_form_revisions/src/Controller/ContactFormRevisionsController.phpView source
<?php
namespace Drupal\contact_form_revisions\Controller;
use Drupal\config_entity_revisions\ConfigEntityRevisionsControllerBase;
use Drupal\config_entity_revisions\ConfigEntityRevisionsControllerInterface;
use Drupal\Core\Config\Entity\ConfigEntityInterface;
use Drupal\contact_form_revisions\ContactFormRevisionsTrait;
/**
* Controller to make library functions available to various consumers.
*/
class ContactFormRevisionsController extends ConfigEntityRevisionsControllerBase implements ConfigEntityRevisionsControllerInterface {
use ContactFormRevisionsTrait;
/**
* Generates a title for the revision.
*
* This function is needed because the $contact parameter needs to match
* the route but the parent's parameter is named $configEntity.
*
* @inheritdoc
*/
public function revisionShowTitle(ConfigEntityInterface $contact_form) {
return '"' . $contact_form
->get('label') . '" contact form, revision ' . $contact_form
->getRevisionId();
}
}
Classes
Name![]() |
Description |
---|---|
ContactFormRevisionsController | Controller to make library functions available to various consumers. |