Repository URL to install this package:
|
Version:
1.1.5 ▾
|
<?php
namespace Drupal\dds_sendgrid_custom_forms\Controller;
use Drupal\Core\Entity\Controller\EntityController;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\custom_forms\Entity\CustomForm;
/**
* Class TitleController
*
* @package Drupal\dds_sendgrid_custom_forms\Controller
*/
class TitleController extends EntityController {
/**
* Provides a generic mail title callback.
*
* @param \Drupal\Core\Routing\RouteMatchInterface $route_match
* The route match.
*
* @return string
* The title for the entity fields page.
*/
public function sendGridTitle(RouteMatchInterface $route_match) {
/** @var CustomForm $custom_form */
if ($custom_form = $route_match->getParameter('custom_form')) {
return $this->t('%label SendGrid', ['%label' => $custom_form->label()]);
}
}
}