* @deprecated in drupal:8.?.? and is removed from drupal:9.0.0.
* Use \Drupal\node\NodeInterface::NOT_PUBLISHED instead.
*
* @see https://www.drupal.org/node/2316145
*/
constNODE_NOT_PUBLISHED=0;
/**
* Denotes that the node is published.
*
* @deprecated in drupal:8.?.? and is removed from drupal:9.0.0.
* Use \Drupal\node\NodeInterface::PUBLISHED instead.
*
* @see https://www.drupal.org/node/2316145
*/
constNODE_PUBLISHED=1;
/**
* Denotes that the node is not promoted to the front page.
*
* @deprecated in drupal:8.?.? and is removed from drupal:9.0.0.
* Use \Drupal\node\NodeInterface::NOT_PROMOTED instead.
*
* @see https://www.drupal.org/node/2316145
*/
constNODE_NOT_PROMOTED=0;
/**
* Denotes that the node is promoted to the front page.
*
* @deprecated in drupal:8.?.? and is removed from drupal:9.0.0.
* Use \Drupal\node\NodeInterface::PROMOTED instead.
*
* @see https://www.drupal.org/node/2316145
*/
constNODE_PROMOTED=1;
/**
* Denotes that the node is not sticky at the top of the page.
*
* @deprecated in drupal:8.?.? and is removed from drupal:9.0.0.
* Use \Drupal\node\NodeInterface::NOT_STICKY instead.
*
* @see https://www.drupal.org/node/2316145
*/
constNODE_NOT_STICKY=0;
/**
* Denotes that the node is sticky at the top of the page.
*
* @deprecated in drupal:8.?.? and is removed from drupal:9.0.0.
* Use \Drupal\node\NodeInterface::STICKY instead.
*
* @see https://www.drupal.org/node/2316145
*/
constNODE_STICKY=1;
/**
* Implements hook_help().
*/
@@ -264,23 +204,6 @@ function node_mark($nid, $timestamp) {
returnMARK_READ;
}
/**
* Returns a list of all the available node types.
*
* This list can include types that are queued for addition or deletion.
*
* @return \Drupal\node\NodeTypeInterface[]
* An array of node type entities, keyed by ID.
*
* @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0.
* Use \Drupal\node\Entity\NodeType::loadMultiple().
*
* @see \Drupal\node\Entity\NodeType::load()
*/
functionnode_type_get_types(){
returnNodeType::loadMultiple();
}
/**
* Returns a list of available node type names.
*
@@ -325,25 +248,6 @@ function node_type_get_description(NodeTypeInterface $node_type) {
return$node_type->getDescription();
}
/**
* Menu argument loader: Loads a node type by string.
*
* @param $name
* The machine name of a node type to load.
*
* @return \Drupal\node\NodeTypeInterface
* A node type object or NULL if $name does not exist.
*
* @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use
* \Drupal\node\Entity\NodeType::load().
*
* @see https://www.drupal.org/node/2266845
*/
functionnode_type_load($name){
@trigger_error('node_type_load() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\node\Entity\NodeType::load(). See https://www.drupal.org/node/2266845',E_USER_DEPRECATED);
returnNodeType::load($name);
}
/**
* Adds the default body field to a node type.
*
@@ -435,60 +339,6 @@ function node_type_update_nodes($old_id, $new_id) {
@trigger_error('node_load_multiple() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\node\Entity\Node::loadMultiple(). See https://www.drupal.org/node/2266845',E_USER_DEPRECATED);
* (optional) Whether to reset the node_load_multiple() cache. Defaults to
* FALSE.
*
* @return \Drupal\node\NodeInterface|null
* A fully-populated node entity, or NULL if the node is not found.
*
* @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use
* \Drupal\node\Entity\Node::load().
*
* @see https://www.drupal.org/node/2266845
*/
functionnode_load($nid=NULL,$reset=FALSE){
@trigger_error('node_load() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\node\Entity\Node::load(). See https://www.drupal.org/node/2266845',E_USER_DEPRECATED);
@trigger_error("node_view() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal::entityTypeManager()->getViewBuilder('node')->view() instead. See https://www.drupal.org/node/3033656",E_USER_DEPRECATED);
return\Drupal::entityTypeManager()
->getViewBuilder('node')
->view($node,$view_mode,$langcode);
}
/**
* Constructs a drupal_render() style array from an array of loaded nodes.
*
* @param $nodes
* An array of nodes as returned by Node::loadMultiple().
* @param $view_mode
* (optional) View mode, e.g., 'full', 'teaser', etc. Defaults to 'teaser.'
* @param $langcode
* (optional) A language code to use for rendering. Defaults to the global
@trigger_error("node_view_multiple() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal::entityTypeManager()->getViewBuilder('node')->viewMultiple() instead. See https://www.drupal.org/node/3033656",E_USER_DEPRECATED);
* @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Define
* entity form routes through the _entity_form instead through the
* _controller directive.
*/
publicfunctionadd(NodeTypeInterface$node_type){
@trigger_error(__METHOD__.' is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Define entity form routes through the _entity_form instead through the _controller directive. See https://www.drupal.org/node/3084856',E_USER_DEPRECATED);
@@ -255,22 +255,6 @@ public function setSticky($sticky) {
return$this;
}
/**
* {@inheritdoc}
*/
publicfunctiongetRevisionAuthor(){
@trigger_error(__NAMESPACE__.'\Node::getRevisionAuthor is deprecated in drupal:8.2.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\RevisionLogInterface::getRevisionUser() instead. See https://www.drupal.org/node/3069750',E_USER_DEPRECATED);
return$this->getRevisionUser();
}
/**
* {@inheritdoc}
*/
publicfunctionsetRevisionAuthorId($uid){
@trigger_error(__NAMESPACE__.'\Node::setRevisionAuthorId is deprecated in drupal:8.2.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Entity\RevisionLogInterface::setRevisionUserId() instead. See https://www.drupal.org/node/3069750',E_USER_DEPRECATED);
return$this->setRevisionUserId($uid);
}
/**
* {@inheritdoc}
*/
@@ -378,20 +362,4 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
return$fields;
}
/**
* Default value callback for 'uid' base field definition.
*
* @see ::baseFieldDefinitions()
*
* @deprecated The ::getCurrentUserId method is deprecated in 8.6.x and will
* be removed before 9.0.0.
*
* @return array
* An array of default values.
*/
publicstaticfunctiongetCurrentUserId(){
@trigger_error('The ::getCurrentUserId method is deprecated in 8.6.x and will be removed before 9.0.0.',E_USER_DEPRECATED);
@trigger_error('NodeType::isNewRevision is deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use Drupal\Core\Entity\RevisionableEntityBundleInterface::shouldCreateNewRevision() instead. See https://www.drupal.org/node/3067365',E_USER_DEPRECATED);