Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
novicell/dds_sendgrid / modules / custom_forms / src / Controller / TitleController.php
Size: Mime:
<?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()]);
    }
  }

}