pm-4.1.x-dev/modules/pm_task/src/Entity/PmTask.php
modules/pm_task/src/Entity/PmTask.php
<?php
namespace Drupal\pm_task\Entity;
use Drupal\pm\PmContentEntityBase;
use Drupal\pm_task\PmTaskInterface;
/**
* Defines the Task entity class.
*
* @ContentEntityType(
* id = "pm_task",
* label = @Translation("Task"),
* label_collection = @Translation("Tasks"),
* label_singular = @Translation("Task"),
* label_plural = @Translation("Tasks"),
* label_count = @PluralTranslation(
* singular = "@count Tasks",
* plural = "@count Tasks",
* ),
* bundle_label = @Translation("Task type"),
* handlers = {
* "list_builder" = "Drupal\pm_task\PmTaskListBuilder",
* "views_data" = "Drupal\views\EntityViewsData",
* "access" = "Drupal\pm_task\PmTaskAccessControlHandler",
* "form" = {
* "add" = "Drupal\pm_task\Form\PmTaskForm",
* "edit" = "Drupal\pm_task\Form\PmTaskForm",
* "delete" = "Drupal\Core\Entity\ContentEntityDeleteForm",
* },
* "route_provider" = {
* "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider",
* }
* },
* base_table = "pm_task",
* admin_permission = "administer pm task types",
* entity_keys = {
* "id" = "id",
* "bundle" = "bundle",
* "label" = "label",
* "uuid" = "uuid",
* "owner" = "uid",
* },
* links = {
* "collection" = "/admin/pm/task",
* "add-form" = "/pm/task/add/{pm_task_type}",
* "add-page" = "/pm/task/add",
* "canonical" = "/pm/task/{pm_task}",
* "edit-form" = "/pm/task/{pm_task}/edit",
* "delete-form" = "/pm/task/{pm_task}/delete",
* },
* bundle_entity_type = "pm_task_type",
* field_ui_base_route = "entity.pm_task_type.edit_form",
* )
*/
class PmTask extends PmContentEntityBase implements PmTaskInterface {
/**
* {@inheritdoc}
*/
public static function getPmContentEntityBaseFieldNames() {
return [
'pm_key',
'pm_project',
'pm_status',
'pm_priority',
'pm_sub_task_list',
'pm_date',
'pm_assignee',
'pm_reviewer',
];
}
}
