postoffice-1.0.x-dev/extensions/postoffice_compat/src/Email/ContactFormEmailTrait.php

extensions/postoffice_compat/src/Email/ContactFormEmailTrait.php
<?php

namespace Drupal\postoffice_compat\Email;

use Drupal\contact\ContactFormInterface;

/**
 * Implements the ContactFormEmailInterface.
 */
trait ContactFormEmailTrait {

  /**
   * The contact form.
   */
  protected ContactFormInterface $contactForm;

  /**
   * {@inheritdoc}
   */
  public function getContactForm(): ContactFormInterface {
    return $this->contactForm;
  }

  /**
   * {@inheritdoc}
   */
  public function getContactFormLabel(): string {
    return $this->contactForm->label();
  }

  /**
   * {@inheritdoc}
   */
  public function getContactFormUrl(): string {
    return $this->contactForm->toUrl('canonical', $this->getUrlOptions())->toString();
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc