function NodeTypeInterface::getPreviewMode

Gets the preview mode.

phpcs:disable Drupal.Commenting @todo Uncomment new method parameters before drupal:12.0.0.

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. phpcs:enable

Return value

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

See also

https://www.drupal.org/project/drupal/issues/3539662

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

File

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

Class

NodeTypeInterface
Provides an interface defining a node type entity.

Namespace

Drupal\node

Code

public function getPreviewMode();

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