Small changes but not fixing workflow.
parent
2f0aff3f95
commit
13ac1bd83d
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace Drupal\yufu_concept\Plugin\rest\resource;
|
namespace Drupal\yufu_concept\Plugin\rest\resource;
|
||||||
|
|
||||||
use Drupal\Core\Config\ConfigFactoryInterface;
|
|
||||||
use Drupal\Core\Entity\EntityTypeManagerInterface;
|
use Drupal\Core\Entity\EntityTypeManagerInterface;
|
||||||
use Drupal\Core\Session\AccountProxyInterface;
|
use Drupal\Core\Session\AccountProxyInterface;
|
||||||
use Drupal\Core\StringTranslation\StringTranslationTrait;
|
use Drupal\Core\StringTranslation\StringTranslationTrait;
|
||||||
|
@ -127,6 +126,7 @@ class AddConcept extends ResourceBase {
|
||||||
$concept->isDefaultRevision(FALSE);
|
$concept->isDefaultRevision(FALSE);
|
||||||
$concept->setRevisionLogMessage('New revision by concept endpoint.');
|
$concept->setRevisionLogMessage('New revision by concept endpoint.');
|
||||||
$concept->moderation_state->target_id = 'draft';
|
$concept->moderation_state->target_id = 'draft';
|
||||||
|
$concept->set('status', 0);
|
||||||
$concept->setUnpublished();
|
$concept->setUnpublished();
|
||||||
$concept->save();
|
$concept->save();
|
||||||
$this->logger->notice('New concept @title revision @revid created by uid @uid.', [
|
$this->logger->notice('New concept @title revision @revid created by uid @uid.', [
|
||||||
|
|
Loading…
Reference in New Issue