function NodeTypeInterface::getPreviewMode

Same name and namespace in other branches
  1. 11.x core/modules/node/src/NodeTypeInterface.php \Drupal\node\NodeTypeInterface::getPreviewMode()
  2. 10 core/modules/node/src/NodeTypeInterface.php \Drupal\node\NodeTypeInterface::getPreviewMode()
  3. 9 core/modules/node/src/NodeTypeInterface.php \Drupal\node\NodeTypeInterface::getPreviewMode()
  4. 8.9.x core/modules/node/src/NodeTypeInterface.php \Drupal\node\NodeTypeInterface::getPreviewMode()

Gets the preview mode.

Parameters

bool $returnAsInt: (deprecated) Whether to return an integer or enum value. The $returnAsInt parameter is deprecated in drupal:11.3.0 and is removed from drupal:13.0.0.

Return value

\Drupal\node\NodePreviewMode|int Returns the enum case if $returnAsInt is FALSE, otherwise returns the integer equivalent.

1 method overrides NodeTypeInterface::getPreviewMode()
NodeType::getPreviewMode in core/modules/node/src/Entity/NodeType.php

File

core/modules/node/src/NodeTypeInterface.php, line 57

Class

NodeTypeInterface
Provides an interface defining a node type entity.

Namespace

Drupal\node

Code

public function getPreviewMode(bool $returnAsInt = TRUE);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.