Drupal 8  8.0.2
NodeType Class Reference
Inheritance diagram for NodeType:

Public Member Functions

 id ()
 
 isLocked ()
 
 isNewRevision ()
 
 setNewRevision ($new_revision)
 
 displaySubmitted ()
 
 setDisplaySubmitted ($display_submitted)
 
 getPreviewMode ()
 
 setPreviewMode ($preview_mode)
 
 getHelp ()
 
 getDescription ()
 
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
- Public Member Functions inherited from ConfigEntityBundleBase
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
 preSave (EntityStorageInterface $storage)
 
- Public Member Functions inherited from ConfigEntityBase
 __construct (array $values, $entity_type)
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 isNew ()
 
 get ($property_name)
 
 set ($property_name, $value)
 
 enable ()
 
 disable ()
 
 setStatus ($status)
 
 status ()
 
 setSyncing ($syncing)
 
 isSyncing ()
 
 setUninstalling ($uninstalling)
 
 isUninstalling ()
 
 createDuplicate ()
 
 preSave (EntityStorageInterface $storage)
 
 calculateDependencies ()
 
 urlInfo ($rel= 'edit-form', array $options=[])
 
 url ($rel= 'edit-form', $options=array())
 
 link ($text=NULL, $rel= 'edit-form', array $options=[])
 
 toUrl ($rel= 'edit-form', array $options=[])
 
 getCacheTagsToInvalidate ()
 
 getDependencies ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
 onDependencyRemoval (array $dependencies)
 
 setThirdPartySetting ($module, $key, $value)
 
 getThirdPartySetting ($module, $key, $default=NULL)
 
 getThirdPartySettings ($module)
 
 unsetThirdPartySetting ($module, $key)
 
 getThirdPartyProviders ()
 
 isInstallable ()
 
 trustData ()
 
 hasTrustedData ()
 
 save ()
 
- Public Member Functions inherited from Entity
 __construct (array $values, $entity_type)
 
 id ()
 
 uuid ()
 
 isNew ()
 
 enforceIsNew ($value=TRUE)
 
 getEntityTypeId ()
 
 bundle ()
 
 label ()
 
 urlInfo ($rel= 'canonical', array $options=[])
 
 toUrl ($rel= 'canonical', array $options=[])
 
 hasLinkTemplate ($rel)
 
 link ($text=NULL, $rel= 'canonical', array $options=[])
 
 toLink ($text=NULL, $rel= 'canonical', array $options=[])
 
 url ($rel= 'canonical', $options=array())
 
 uriRelationships ()
 
 access ($operation, AccountInterface $account=NULL, $return_as_object=FALSE)
 
 language ()
 
 save ()
 
 delete ()
 
 createDuplicate ()
 
 getEntityType ()
 
 preSave (EntityStorageInterface $storage)
 
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
 postCreate (EntityStorageInterface $storage)
 
 referencedEntities ()
 
 getCacheContexts ()
 
 getCacheTagsToInvalidate ()
 
 getCacheTags ()
 
 getCacheMaxAge ()
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 toArray ()
 
 getTypedData ()
 
 __sleep ()
 
 getConfigDependencyKey ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
- Public Member Functions inherited from RefinableCacheableDependencyInterface
 addCacheContexts (array $cache_contexts)
 
 addCacheTags (array $cache_tags)
 
 mergeCacheMaxAge ($max_age)
 
 addCacheableDependency ($other_object)
 

Static Public Member Functions

static postDelete (EntityStorageInterface $storage, array $entities)
 
- Static Public Member Functions inherited from ConfigEntityBundleBase
static postDelete (EntityStorageInterface $storage, array $entities)
 
- Static Public Member Functions inherited from ConfigEntityBase
static sort (ConfigEntityInterface $a, ConfigEntityInterface $b)
 
- Static Public Member Functions inherited from Entity
static preCreate (EntityStorageInterface $storage, array &$values)
 
static preDelete (EntityStorageInterface $storage, array $entities)
 
static postDelete (EntityStorageInterface $storage, array $entities)
 
static postLoad (EntityStorageInterface $storage, array &$entities)
 
static load ($id)
 
static loadMultiple (array $ids=NULL)
 
static create (array $values=array())
 

Protected Attributes

 $type
 
 $name
 
 $description
 
 $help
 
 $new_revision = FALSE
 
 $preview_mode = DRUPAL_OPTIONAL
 
 $display_submitted = TRUE
 
- Protected Attributes inherited from ConfigEntityBase
 $originalId
 
 $pluginConfigKey
 
 $status = TRUE
 
 $uuid
 
 $langcode = 'en'
 
 $third_party_settings = array()
 
 $_core = []
 
 $trustedData = FALSE
 
- Protected Attributes inherited from Entity
 $entityTypeId
 
 $enforceIsNew
 
 $typedData
 

Additional Inherited Members

- Protected Member Functions inherited from ConfigEntityBundleBase
 deleteDisplays ()
 
 loadDisplays ($entity_type_id)
 
- Protected Member Functions inherited from ConfigEntityBase
 getTypedConfig ()
 
 addDependency ($type, $name)
 
 invalidateTagsOnSave ($update)
 
- Protected Member Functions inherited from Entity
 entityManager ()
 
 entityTypeManager ()
 
 languageManager ()
 
 uuidGenerator ()
 
 linkTemplates ()
 
 urlRouteParameters ($rel)
 
 invalidateTagsOnSave ($update)
 
- Static Protected Member Functions inherited from ConfigEntityBase
static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 
static getConfigManager ()
 
- Static Protected Member Functions inherited from Entity
static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 

Detailed Description

Defines the Node type configuration entity.

( id = "node_type", label = ("Content type"), handlers = { "access" = "Drupal\node\NodeTypeAccessControlHandler", "form" = { "add" = "Drupal\node\NodeTypeForm", "edit" = "Drupal\node\NodeTypeForm", "delete" = "Drupal\node\Form\NodeTypeDeleteConfirm" }, "list_builder" = "Drupal\node\NodeTypeListBuilder", }, admin_permission = "administer content types", config_prefix = "type", bundle_of = "node", entity_keys = { "id" = "type", "label" = "name" }, links = { "edit-form" = "/admin/structure/types/manage/{node_type}", "delete-form" = "/admin/structure/types/manage/{node_type}/delete", "collection" = "/admin/structure/types", }, config_export = { "name", "type", "description", "help", "new_revision", "preview_mode", "display_submitted", } )

Member Function Documentation

displaySubmitted ( )

{Gets whether 'Submitted by' information should be shown.

Returns
bool TRUE if the submitted by information should be shown.
}

Implements NodeTypeInterface.

getDescription ( )

{Gets the description.

Returns
string The description of this node type.
}

Implements NodeTypeInterface.

getHelp ( )

{Gets the help information.

Returns
string The help information of this node type.
}

Implements NodeTypeInterface.

getPreviewMode ( )

{Gets the preview mode.

Returns
int DRUPAL_DISABLED, DRUPAL_OPTIONAL or DRUPAL_REQUIRED.
}

Implements NodeTypeInterface.

id ( )

{Gets the identifier.

Returns
string|int|null The entity identifier, or NULL if the object does not yet have an identifier.
}

Implements EntityInterface.

Referenced by NodeType\isLocked().

Here is the caller graph for this function:

isLocked ( )

{Determines whether the node type is locked.

Returns
string|false The module name that locks the type or FALSE.
}

Implements NodeTypeInterface.

References NodeType\id(), and Drupal\state().

Here is the call graph for this function:

isNewRevision ( )

{Gets whether a new revision should be created by default.

Returns
bool TRUE if a new revision should be created by default.
}

Implements NodeTypeInterface.

static postDelete ( EntityStorageInterface  $storage,
array  $entities 
)
static

{}

postSave ( EntityStorageInterface  $storage,
  $update = TRUE 
)

{}

References Entity\entityManager(), ConfigEntityBase\getOriginalId(), and Drupal\translation().

Here is the call graph for this function:

setDisplaySubmitted (   $display_submitted)

{Sets whether 'Submitted by' information should be shown.

Parameters
bool$display_submittedTRUE if the submitted by information should be shown.
}

Implements NodeTypeInterface.

setNewRevision (   $new_revision)

{Sets whether a new revision should be created by default.

Parameters
bool$new_revision_TRUE if a new revision should be created by default.
}

Implements NodeTypeInterface.

setPreviewMode (   $preview_mode)

{Sets the preview mode.

Parameters
int$preview_modeDRUPAL_DISABLED, DRUPAL_OPTIONAL or DRUPAL_REQUIRED.
}

Implements NodeTypeInterface.


The documentation for this class was generated from the following file: