NodePreviewController::view

public NodePreviewController::view(EntityInterface $node_preview, $view_mode_id = 'full', $langcode = NULL) Provides a page to render a single entity. Parameters \Drupal\Core\Entity\EntityInterface $_entity: The Entity to be rendered. Note this variable is named $_entity rather than $entity to prevent collisions with other named placeholders in the route. string $view_mode: (optional) The view mode that should be used to display the entity. Defaults to 'full'. Return value array A render arra

NodePreviewController::title

public NodePreviewController::title(EntityInterface $node_preview) The _title_callback for the page that renders a single node in preview. Parameters \Drupal\Core\Entity\EntityInterface $node_preview: The current node. Return value string The page title. File core/modules/node/src/Controller/NodePreviewController.php, line 37 Class NodePreviewController Defines a controller to render a single node in preview. Namespace Drupal\node\Controller Code public function title(EntityInterface

NodePreviewController

Defines a controller to render a single node in preview. Hierarchy class \Drupal\Core\Entity\Controller\EntityViewController implements ContainerInjectionInterfaceclass \Drupal\node\Controller\NodePreviewController File core/modules/node/src/Controller/NodePreviewController.php, line 11 Namespace Drupal\node\Controller Members Name Modifiers Type Description EntityViewController::$entityManager protected property The entity manager EntityViewController::$renderer pr

NodePreviewAccessCheck::__construct

public NodePreviewAccessCheck::__construct(EntityManagerInterface $entity_manager) Constructs a EntityCreateAccessCheck object. Parameters \Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager. File core/modules/node/src/Access/NodePreviewAccessCheck.php, line 30 Class NodePreviewAccessCheck Determines access to node previews. Namespace Drupal\node\Access Code public function __construct(EntityManagerInterface $entity_manager) { $this->entityManager = $en

NodePreviewAccessCheck::access

public NodePreviewAccessCheck::access(AccountInterface $account, NodeInterface $node_preview) Checks access to the node preview page. Parameters \Drupal\Core\Session\AccountInterface $account: The currently logged in account. \Drupal\node\NodeInterface $node_preview: The node that is being previewed. Return value string A \Drupal\Core\Access\AccessInterface constant value. File core/modules/node/src/Access/NodePreviewAccessCheck.php, line 45 Class NodePreviewAccessCheck Determines access

NodePreviewAccessCheck::$entityManager

The entity manager. Type: \Drupal\Core\Entity\EntityManagerInterface File core/modules/node/src/Access/NodePreviewAccessCheck.php, line 22 Class NodePreviewAccessCheck Determines access to node previews. Namespace Drupal\node\Access Code protected $entityManager;

NodePreviewAccessCheck

Determines access to node previews. Hierarchy class \Drupal\node\Access\NodePreviewAccessCheck implements AccessInterface Related topics Node access rights The node access system determines who can do what to which nodes. File core/modules/node/src/Access/NodePreviewAccessCheck.php, line 15 Namespace Drupal\node\Access Members Name Modifiers Type Description NodePreviewAccessCheck::$entityManager protected property The entity manager. NodePreviewAccessCheck::access

NodeModerationHandler::shouldModerate

protected NodeModerationHandler::shouldModerate(ContentEntityInterface $entity, $published_state) Check if an entity's default revision and/or state needs adjusting. Parameters \Drupal\Core\Entity\ContentEntityInterface $entity: The entity to check. bool $published_state: Whether the state being transitioned to is a published state or not. Return value bool TRUE when either the default revision or the state needs to be updated. File core/modules/content_moderation/src/Entity/Handler/NodeModer

NodeModerationHandler::onPresave

public NodeModerationHandler::onPresave(ContentEntityInterface $entity, $default_revision, $published_state) Operates on moderated content entities preSave(). Parameters \Drupal\Core\Entity\ContentEntityInterface $entity: The entity to modify. bool $default_revision: Whether the new revision should be made the default revision. bool $published_state: Whether the state being transitioned to is a published state or not. Overrides ModerationHandler::onPresave File core/modules/content_moderation/

NodeModerationHandler::enforceRevisionsEntityFormAlter

public NodeModerationHandler::enforceRevisionsEntityFormAlter(array &$form, FormStateInterface $form_state, $form_id) Alters entity forms to enforce revision handling. Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. string $form_id: The form id. Overrides ModerationHandler::enforceRevisionsEntityFormAlter See also hook_form_alter() File core/modules/content_moderation/src/En