ContentPreprocess::preprocessNode

public ContentPreprocess::preprocessNode(array &$variables) Wrapper for hook_preprocess_HOOK(). Parameters array $variables: Theme variables to preprocess. File core/modules/content_moderation/src/ContentPreprocess.php, line 47 Class ContentPreprocess Determines whether a route is the "Latest version" tab of a node. Namespace Drupal\content_moderation Code public function preprocessNode(array &$variables) { // Set the 'page' template variable when the node is being displayed

ContentPreprocess::create

public static ContentPreprocess::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. Parameters \Symfony\Component\DependencyInjection\ContainerInterface $container: The servic

ContentPreprocess::$routeMatch

The route match service. Type: \Drupal\Core\Routing\RouteMatchInterface $routeMatch File core/modules/content_moderation/src/ContentPreprocess.php, line 20 Class ContentPreprocess Determines whether a route is the "Latest version" tab of a node. Namespace Drupal\content_moderation Code protected $routeMatch;

ContentPreprocess

Determines whether a route is the "Latest version" tab of a node. Hierarchy class \Drupal\content_moderation\ContentPreprocess implements ContainerInjectionInterface File core/modules/content_moderation/src/ContentPreprocess.php, line 13 Namespace Drupal\content_moderation Members Name Modifiers Type Description ContentPreprocess::$routeMatch protected property The route match service. ContentPreprocess::create public static function Instantiates a new instance o

ContentModerationStateInterface

An interface for Content moderation state entity. Content moderation state entities track the moderation state of other content entities. Hierarchy interface \Drupal\Core\Entity\ContentEntityInterface extends \Traversable; interface \Drupal\user\EntityOwnerInterfaceinterface \Drupal\content_moderation\ContentModerationStateInterface File core/modules/content_moderation/src/ContentModerationStateInterface.php, line 14 Namespace Drupal\content_moderation Members Name Modifiers Type

ContentModerationState::updateOrCreateFromEntity

public static ContentModerationState::updateOrCreateFromEntity(ContentModerationState $content_moderation_state) Creates or updates an entity's moderation state whilst saving that entity. @internal This method should only be called as a result of saving the related content entity. Parameters \Drupal\content_moderation\Entity\ContentModerationState $content_moderation_state: The content moderation entity content entity to create or save. File core/modules/content_moderation/src/Entity/ContentMo

ContentModerationState::setOwnerId

public ContentModerationState::setOwnerId($uid) Sets the entity owner's user ID. Parameters int $uid: The owner user id. Return value $this Overrides EntityOwnerInterface::setOwnerId File core/modules/content_moderation/src/Entity/ContentModerationState.php, line 109 Class ContentModerationState Defines the Content moderation state entity. Namespace Drupal\content_moderation\Entity Code public function setOwnerId($uid) { $this->set('uid', $uid); return $this; }

ContentModerationState::setOwner

public ContentModerationState::setOwner(UserInterface $account) Sets the entity owner's user entity. Parameters \Drupal\user\UserInterface $account: The owner user entity. Return value $this Overrides EntityOwnerInterface::setOwner File core/modules/content_moderation/src/Entity/ContentModerationState.php, line 117 Class ContentModerationState Defines the Content moderation state entity. Namespace Drupal\content_moderation\Entity Code public function setOwner(UserInterface $account)

ContentModerationState::save

public ContentModerationState::save() Saves an entity permanently. When saving existing entities, the entity is assumed to be complete, partial updates of entities are not supported. Return value int Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed. Throws \Drupal\Core\Entity\EntityStorageException In case of failures an exception is thrown. Overrides Entity::save File core/modules/content_moderation/src/Entity/ContentModerationState.php, line 151 Class ContentModer

ContentModerationState::realSave

protected ContentModerationState::realSave() Saves an entity permanently. When saving existing entities, the entity is assumed to be complete, partial updates of entities are not supported. Return value int Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed. Throws \Drupal\Core\Entity\EntityStorageException In case of failures an exception is thrown. File core/modules/content_moderation/src/Entity/ContentModerationState.php, line 174 Class ContentModerationState Defi