Small changes but not fixing workflow.

pull/42/head
Lio Novelli 2024-03-17 20:21:54 +01:00
parent 2f0aff3f95
commit 13ac1bd83d
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,6 @@
namespace Drupal\yufu_concept\Plugin\rest\resource;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Session\AccountProxyInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
@ -127,6 +126,7 @@ class AddConcept extends ResourceBase {
$concept->isDefaultRevision(FALSE);
$concept->setRevisionLogMessage('New revision by concept endpoint.');
$concept->moderation_state->target_id = 'draft';
$concept->set('status', 0);
$concept->setUnpublished();
$concept->save();
$this->logger->notice('New concept @title revision @revid created by uid @uid.', [