You are here

Note.php in Drupal PM (Project Management) 4.x

File

modules/pm_note/src/Entity/Note.php
View source
<?php

namespace Drupal\pm_note\Entity;

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\pm_project\Entity\WorkableItem;
use Drupal\user\UserInterface;

/**
 * Defines the Note entity.
 *
 * @ingroup pm_note
 *
 * @ContentEntityType(
 *   id = "pm_note",
 *   label = @Translation("Note"),
 *   bundle_label = @Translation("Note type"),
 *   handlers = {
 *     "view_builder" = "Drupal\Core\Entity\EntityViewBuilder",
 *     "list_builder" = "Drupal\pm_note\NoteListBuilder",
 *     "views_data" = "Drupal\pm_note\Entity\NoteViewsData",
 *
 *     "form" = {
 *       "default" = "Drupal\pm_note\Form\NoteForm",
 *       "add" = "Drupal\pm_note\Form\NoteForm",
 *       "edit" = "Drupal\pm_note\Form\NoteForm",
 *       "delete" = "Drupal\pm_note\Form\NoteDeleteForm",
 *     },
 *     "route_provider" = {
 *       "html" = "Drupal\pm_note\NoteHtmlRouteProvider",
 *     },
 *     "access" = "Drupal\pm_note\NoteAccessControlHandler",
 *   },
 *   base_table = "pm_note",
 *   translatable = FALSE,
 *   permission_granularity = "bundle",
 *   admin_permission = "administer note entities",
 *   entity_keys = {
 *     "id" = "id",
 *     "bundle" = "type",
 *     "label" = "name",
 *     "uuid" = "uuid",
 *     "uid" = "user_id",
 *     "langcode" = "langcode",
 *   },
 *   links = {
 *     "canonical" = "/pm/note/{pm_note}",
 *     "add-page" = "/pm/note/add",
 *     "add-form" = "/pm/note/add/{pm_note_type}",
 *     "edit-form" = "/pm/note/{pm_note}/edit",
 *     "delete-form" = "/pm/note/{pm_note}/delete",
 *     "collection" = "/pm/note",
 *   },
 *   bundle_entity_type = "pm_note_type",
 *   field_ui_base_route = "entity.pm_note_type.edit_form"
 * )
 */
class Note extends WorkableItem implements NoteInterface {

}

Classes

Namesort descending Description
Note Defines the Note entity.