Alias not set in node creation
If you are programmatically creating a node, and setting the alias is not working, make sure you have turned off the "Generate automatic URL alias" setting:
If you are programmatically creating a node, and setting the alias is not working, make sure you have turned off the "Generate automatic URL alias" setting:
EntityTypeManager does not allow for filtering through moderation states, although it is in the works for Drupal 11: https://www.drupal.org/project/drupal/issues/3025164#comment-13221005. 
Create a paragraph
// Set the current date and time.
$node = Node::load(1);
$node->set('field_date', date('Y-m-d', time()));
$node->set('field_datetime', date('Y-m-d\TH:i:s', time()));
$node->set('created