Drupal 8  8.0.2
NodePreviewForm Class Reference
Inheritance diagram for NodePreviewForm:

Public Member Functions

 __construct (EntityManagerInterface $entity_manager, ConfigFactoryInterface $config_factory)
 getFormId ()
 buildForm (array $form, FormStateInterface $form_state, EntityInterface $node=NULL)
 submitForm (array &$form, FormStateInterface $form_state)

Static Public Member Functions

static create (ContainerInterface $container)

Protected Attributes


Detailed Description

Contains a form for switching the view mode of a node during preview.

Constructor & Destructor Documentation

__construct ( EntityManagerInterface  $entity_manager,
ConfigFactoryInterface  $config_factory 

Constructs a new NodePreviewForm.

\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager service.
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe configuration factory.

References Drupal\configFactory(), and Drupal\entityManager().

Here is the call graph for this function:

Member Function Documentation

buildForm ( array  $form,
FormStateInterface  $form_state,
EntityInterface  $node = NULL 

Form constructor.

array$formAn associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
\Drupal\Core\Entity\EntityInterface$nodeThe node being previews
array The form structure.

References Drupal\entityManager(), Url\fromRoute(), and t().

Here is the call graph for this function:

static create ( ContainerInterface  $container)

{Instantiates a new instance of this class.This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.

\Symfony\Component\DependencyInjection\ContainerInterface$containerThe service container this instance should use.

Implements ContainerInjectionInterface.

getFormId ( )


submitForm ( array &  $form,
FormStateInterface  $form_state 


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