Drupal 8  8.0.2
ContactController Class Reference
Inheritance diagram for ContactController:

Public Member Functions

 __construct (RendererInterface $renderer)
 
 contactSitePage (ContactFormInterface $contact_form=NULL)
 
 contactPersonalPage (UserInterface $user)
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Protected Attributes

 $renderer
 

Detailed Description

Controller routines for contact routes.

Constructor & Destructor Documentation

__construct ( RendererInterface  $renderer)

Constructs a ContactController object.

Parameters
\Drupal\Core\Render\RendererInterface$rendererThe renderer.

Member Function Documentation

contactPersonalPage ( UserInterface  $user)

Form constructor for the personal contact form.

Parameters
\Drupal\user\UserInterface$userThe account for which a personal contact form should be generated.
Returns
array The personal contact form as render array as expected by drupal_render().
Exceptions
\Symfony\Component\HttpKernel\Exception\NotFoundHttpExceptionException is thrown when user tries to access a contact form for a user who does not have an email address configured.

References Drupal\entityManager(), AccountInterface\getDisplayName(), AccountInterface\getEmail(), AccountInterface\id(), and t().

Here is the call graph for this function:

contactSitePage ( ContactFormInterface  $contact_form = NULL)

Presents the site-wide contact form.

Parameters
\Drupal\contact\ContactFormInterface$contact_formThe contact form to use.
Returns
array The form as render array as expected by drupal_render().
Exceptions
\Symfony\Component\HttpKernel\Exception\NotFoundHttpExceptionException is thrown when user tries to access non existing default contact form.

References Drupal\config(), Drupal\currentUser(), Drupal\entityManager(), t(), and Drupal\url().

Here is the call graph for this function:

static create ( ContainerInterface  $container)
static

{}


The documentation for this class was generated from the following file: