Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
MethodDetailType
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2
3namespace Drupal\crm\Entity;
4
5use Drupal\Core\Entity\Attribute\ConfigEntityType;
6use Drupal\Core\Entity\EntityDeleteForm;
7use Drupal\Core\StringTranslation\TranslatableMarkup;
8use Drupal\crm\ListBuilder\MethodDetailTypeListBuilder;
9use Drupal\crm\Form\MethodDetailTypeForm;
10use Drupal\Core\Config\Entity\ConfigEntityBase;
11
12/**
13 * Defines the method detail type entity type.
14 */
15#[ConfigEntityType(
16  id: 'crm_method_detail_type',
17  label: new TranslatableMarkup('Method Detail Type'),
18  label_collection: new TranslatableMarkup('Method Detail Types'),
19  label_singular: new TranslatableMarkup('method detail type'),
20  label_plural: new TranslatableMarkup('method detail types'),
21  label_count: [
22    'singular' => '@count method detail type',
23    'plural' => '@count method detail types',
24  ],
25  handlers: [
26    'form' => [
27      'add' => MethodDetailTypeForm::class,
28      'edit' => MethodDetailTypeForm::class,
29      'delete' => EntityDeleteForm::class,
30    ],
31    'list_builder' => MethodDetailTypeListBuilder::class,
32  ],
33  admin_permission: 'administer crm',
34  config_prefix: 'crm_method_detail_type',
35  entity_keys: [
36    'id' => 'id',
37    'label' => 'label',
38    'uuid' => 'uuid',
39  ],
40  links: [
41    'add-form' => '/admin/structure/crm/method-detail-type/add',
42    'edit-form' => '/admin/structure/crm/method-detail-type/manage/{crm_method_detail_type}',
43    'delete-form' => '/admin/structure/crm/method-detail-type/manage/{crm_method_detail_type}/delete',
44    'collection' => '/admin/structure/crm/method-detail-type',
45  ],
46  config_export: [
47    'id',
48    'label',
49    'description',
50    'bundles',
51    'negate',
52  ],
53)]
54class MethodDetailType extends ConfigEntityBase implements MethodDetailTypeInterface {
55
56  /**
57   * The method detail type id.
58   *
59   * @var string
60   */
61  protected $id;
62
63  /**
64   * The method detail type label.
65   *
66   * @var string
67   */
68  protected $label;
69
70  /**
71   * The method detail type status.
72   *
73   * @var bool
74   */
75  protected $status;
76
77  /**
78   * The crm_method_detail_type description.
79   *
80   * @var string
81   */
82  protected $description;
83
84  /**
85   * The bundles associated with this method detail type.
86   *
87   * @var array
88   */
89  protected $bundles;
90
91  /**
92   * The negate condition for this method detail type.
93   *
94   * @var bool
95   */
96  protected $negate;
97
98}