Same filename in this branch
- 10 core/modules/content_moderation/src/ContentModerationState.php
- 10 core/modules/content_moderation/src/Entity/ContentModerationState.php
Same filename and directory in other branches
- 8.9.x core/modules/content_moderation/src/ContentModerationState.php
- 9 core/modules/content_moderation/src/ContentModerationState.php
Namespace
Drupal\content_moderation
File
core/modules/content_moderation/src/ContentModerationState.php
View source
<?php
namespace Drupal\content_moderation;
use Drupal\workflows\StateInterface;
class ContentModerationState implements StateInterface {
protected $state;
protected $published;
protected $defaultRevision;
public function __construct(StateInterface $state, $published = FALSE, $default_revision = FALSE) {
$this->state = $state;
$this->published = $published;
$this->defaultRevision = $default_revision;
}
public function isPublishedState() {
return $this->published;
}
public function isDefaultRevisionState() {
return $this->defaultRevision;
}
public function id() {
return $this->state
->id();
}
public function label() {
return $this->state
->label();
}
public function weight() {
return $this->state
->weight();
}
public function canTransitionTo($to_state_id) {
return $this->state
->canTransitionTo($to_state_id);
}
public function getTransitionTo($to_state_id) {
return $this->state
->getTransitionTo($to_state_id);
}
public function getTransitions() {
return $this->state
->getTransitions();
}
}
Classes