<commit_before>{% extends "base/class.php.twig" %}

{% block file_path %}
\Drupal\{{ module }}\Entity\{{ entity_class }}.
{% endblock %}

{% block namespace_class %}
namespace Drupal\{{ module }}\Entity;
{% endblock %}

{% block use_class %}
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\Entity\ContentEntityBase;
use Drupal\Core\Entity\EntityChangedTrait;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\{{ module }}\{{ entity_class }}Interface;
use Drupal\user\UserInterface;
{% endblock %}

{% block class_declaration %}
/**
 * Defines the {{ label }} entity.
 *
 * @ingroup {{ module }}
 *
 * @ContentEntityType(
 *   id = "{{ entity_name }}",
 *   label = @Translation("{{ label }}"),
 *   handlers = {
 *     "view_builder" = "Drupal\Core\Entity\EntityViewBuilder",
 *     "list_builder" = "Drupal\{{ module }}\{{ entity_class }}ListBuilder",
 *     "views_data" = "Drupal\{{ module }}\Entity\{{ entity_class }}ViewsData",
 *
 *     "form" = {
 *       "default" = "Drupal\{{ module }}\Entity\Form\{{ entity_class }}Form",
 *       "add" = "Drupal\{{ module }}\Entity\Form\{{ entity_class }}Form",
 *       "edit" = "Drupal\{{ module }}\Entity\Form\{{ entity_class }}Form",
 *       "delete" = "Drupal\{{ module }}\Entity\Form\{{ entity_class }}DeleteForm",
 *     },
 *     "access" = "Drupal\{{ module }}\{{ entity_class }}AccessControlHandler",
 *   },
 *   base_table = "{{ entity_name }}",
 *   admin_permission = "administer {{ entity_class }} entity",
{% if bundle_entity_type %}
 *   entity_keys = {
 *     "id" = "id",
 *     "bundle" = "type",
 *     "label" = "name",
 *     "uuid" = "uuid"
 *   },
{% else %}
 *   entity_keys = {
 *     "id" = "id",
 *     "label" = "name",
 *     "uuid" = "uuid"
 *   },
{% endif %}
 *   links = {
 *     "canonical" = "/admin/{{ entity_name }}/{{ '{'~entity_name~'}' }}",<commit_msg>#1391: declare additionnal entity keys<commit_after>{% extends "base/class.php.twig" %}

{% block file_path %}
\Drupal\{{ module }}\Entity\{{ entity_class }}.
{% endblock %}

{% block namespace_class %}
namespace Drupal\{{ module }}\Entity;
{% endblock %}

{% block use_class %}
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\Entity\ContentEntityBase;
use Drupal\Core\Entity\EntityChangedTrait;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\{{ module }}\{{ entity_class }}Interface;
use Drupal\user\UserInterface;
{% endblock %}

{% block class_declaration %}
/**
 * Defines the {{ label }} entity.
 *
 * @ingroup {{ module }}
 *
 * @ContentEntityType(
 *   id = "{{ entity_name }}",
 *   label = @Translation("{{ label }}"),
{% if bundle_entity_type %}
 *   bundle_label = @Translation("{{ label }} type"),
{% endif %}
 *   handlers = {
 *     "view_builder" = "Drupal\Core\Entity\EntityViewBuilder",
 *     "list_builder" = "Drupal\{{ module }}\{{ entity_class }}ListBuilder",
 *     "views_data" = "Drupal\{{ module }}\Entity\{{ entity_class }}ViewsData",
 *
 *     "form" = {
 *       "default" = "Drupal\{{ module }}\Entity\Form\{{ entity_class }}Form",
 *       "add" = "Drupal\{{ module }}\Entity\Form\{{ entity_class }}Form",
 *       "edit" = "Drupal\{{ module }}\Entity\Form\{{ entity_class }}Form",
 *       "delete" = "Drupal\{{ module }}\Entity\Form\{{ entity_class }}DeleteForm",
 *     },
 *     "access" = "Drupal\{{ module }}\{{ entity_class }}AccessControlHandler",
 *   },
 *   base_table = "{{ entity_name }}",
 *   admin_permission = "administer {{ entity_class }} entity",
{% if bundle_entity_type %}
 *   entity_keys = {
 *     "id" = "id",
 *     "bundle" = "type",
 *     "label" = "name",
 *     "uuid" = "uuid",
 *     "uid" = "user_id",
 *     "langcode" = "langcode",
 *   },
{% else %}
 *   entity_keys = {
 *     "id" = "id",
 *     "label" = "name",
 *     "uuid" = "uuid",
 *     "uid" = "user_id",
 *     "langcode" = "langcode",
 *   },
{% endif %}
 *   links = {
 *     "canonical" = "/admin/{{ entity_name }}/{{ '{'~entity_name~'}' }}",
{'fraction_non_alphanumeric': 0.21359703337453648, 'fraction_numerical': 0.000988875154511743, 'mean_word_length': 3.3693304535637147, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7654556', 'n_tokens_mistral': 1416, 'n_tokens_neox': 1378, 'n_words': 271}