/**
* Creates a context definition from a given entity type ID.
*
* @param string $entity_type_id
* The entity type ID from which to derive a context definition.
*
* @return static
*/ publicstaticfunctionfromEntityTypeId($entity_type_id){ $entity_type = \Drupal::entityTypeManager()->getDefinition($entity_type_id); returnstatic::fromEntityType($entity_type); }
/**
* Creates a context definition from a given entity type.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type from which to derive a context definition.
*
* @return static
*/ publicstaticfunctionfromEntityType(EntityTypeInterface $entity_type){
/**
* Gets a context from an entity type.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* Entity type from which a definition will be derived.
* @param string $label
* (optional) The label of the context.
*
* @return static
*/