interface ContactFormInterface
Same name and namespace in other branches
- 11.x core/modules/contact/src/ContactFormInterface.php \Drupal\contact\ContactFormInterface
- 10 core/modules/contact/src/ContactFormInterface.php \Drupal\contact\ContactFormInterface
- 8.9.x core/modules/contact/src/ContactFormInterface.php \Drupal\contact\ContactFormInterface
Provides an interface defining a contact form entity.
Hierarchy
- interface \Drupal\Core\Config\Entity\ThirdPartySettingsInterface; interface \Drupal\Core\Entity\EntityInterface extends \Drupal\Core\Access\AccessibleInterface, \Drupal\Core\Cache\CacheableDependencyInterface, \Drupal\Core\Cache\RefinableCacheableDependencyInterface; interface \Drupal\Core\Entity\SynchronizableInterface extends \Drupal\Core\Entity\EntityInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityInterface extends \Drupal\Core\Entity\EntityInterface, \Drupal\Core\Config\Entity\ThirdPartySettingsInterface, \Drupal\Core\Entity\SynchronizableInterface
- interface \Drupal\contact\ContactFormInterface extends \Drupal\Core\Config\Entity\ConfigEntityInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityInterface extends \Drupal\Core\Entity\EntityInterface, \Drupal\Core\Config\Entity\ThirdPartySettingsInterface, \Drupal\Core\Entity\SynchronizableInterface
Expanded class hierarchy of ContactFormInterface
All classes that implement ContactFormInterface
4 files declare their use of ContactFormInterface
- ContactController.php in core/
modules/ contact/ src/ Controller/ ContactController.php - ContactForm.php in core/
modules/ contact/ src/ Entity/ ContactForm.php - contact_storage_test.module in core/
modules/ contact/ tests/ modules/ contact_storage_test/ contact_storage_test.module - Contains custom contact message functionality for ContactStorageTest.
- MigrateContactCategoryTest.php in core/
modules/ contact/ tests/ src/ Kernel/ Migrate/ MigrateContactCategoryTest.php
File
-
core/
modules/ contact/ src/ ContactFormInterface.php, line 10
Namespace
Drupal\contactView source
interface ContactFormInterface extends ConfigEntityInterface {
/**
* Returns the message to be displayed to user.
*
* @return string
* A user message.
*/
public function getMessage();
/**
* Returns list of recipient email addresses.
*
* @return array
* List of recipient email addresses.
*/
public function getRecipients();
/**
* Returns the path for redirect.
*
* @return string
* The redirect path.
*/
public function getRedirectPath();
/**
* Returns the \Drupal\Core\Url object for redirect path.
*
* Empty redirect property results a \Drupal\Core\Url object of front page.
*
* @return \Drupal\Core\Url
* The redirect \Drupal\Core\Url object.
*/
public function getRedirectUrl();
/**
* Returns an auto-reply message to send to the message author.
*
* @return string
* An auto-reply message
*/
public function getReply();
/**
* Returns the weight of this category (used for sorting).
*
* @return int
* The weight of this category.
*/
public function getWeight();
/**
* Sets the message to be displayed to the user.
*
* @param string $message
* The message to display after form is submitted.
*
* @return $this
*/
public function setMessage($message);
/**
* Sets list of recipient email addresses.
*
* @param array $recipients
* The desired list of email addresses of this category.
*
* @return $this
*/
public function setRecipients($recipients);
/**
* Sets the redirect path.
*
* @param string $redirect
* The desired path.
*
* @return $this
*/
public function setRedirectPath($redirect);
/**
* Sets an auto-reply message to send to the message author.
*
* @param string $reply
* The desired reply.
*
* @return $this
*/
public function setReply($reply);
/**
* Sets the weight.
*
* @param int $weight
* The desired weight.
*
* @return $this
*/
public function setWeight($weight);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.