pm-4.1.x-dev/modules/pm_sub_task/src/Entity/PmSubTask.php

modules/pm_sub_task/src/Entity/PmSubTask.php
<?php

namespace Drupal\pm_sub_task\Entity;

use Drupal\pm\PmContentEntityBase;
use Drupal\pm_sub_task\PmSubTaskInterface;

/**
 * Defines the Sub Task entity class.
 *
 * @ContentEntityType(
 *   id = "pm_sub_task",
 *   label = @Translation("Sub Task"),
 *   label_collection = @Translation("Sub Tasks"),
 *   label_singular = @Translation("Sub Task"),
 *   label_plural = @Translation("Sub Tasks"),
 *   label_count = @PluralTranslation(
 *     singular = "@count Sub Tasks",
 *     plural = "@count Sub Tasks",
 *   ),
 *   bundle_label = @Translation("Sub Task type"),
 *   handlers = {
 *     "list_builder" = "Drupal\pm_sub_task\PmSubTaskListBuilder",
 *     "views_data" = "Drupal\views\EntityViewsData",
 *     "access" = "Drupal\pm_sub_task\PmSubTaskAccessControlHandler",
 *     "form" = {
 *       "add" = "Drupal\pm_sub_task\Form\PmSubTaskForm",
 *       "edit" = "Drupal\pm_sub_task\Form\PmSubTaskForm",
 *       "delete" = "Drupal\Core\Entity\ContentEntityDeleteForm",
 *     },
 *     "route_provider" = {
 *       "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider",
 *     }
 *   },
 *   base_table = "pm_sub_task",
 *   admin_permission = "administer pm sub task types",
 *   entity_keys = {
 *     "id" = "id",
 *     "bundle" = "bundle",
 *     "label" = "label",
 *     "uuid" = "uuid",
 *     "owner" = "uid",
 *   },
 *   links = {
 *     "collection" = "/admin/pm/sub-task",
 *     "add-form" = "/pm/sub-task/add/{pm_sub_task_type}",
 *     "add-page" = "/pm/sub-task/add",
 *     "canonical" = "/pm/sub-task/{pm_sub_task}",
 *     "edit-form" = "/pm/sub-task/{pm_sub_task}/edit",
 *     "delete-form" = "/pm/sub-task/{pm_sub_task}/delete",
 *   },
 *   bundle_entity_type = "pm_sub_task_type",
 *   field_ui_base_route = "entity.pm_sub_task_type.edit_form",
 * )
 */
class PmSubTask extends PmContentEntityBase implements PmSubTaskInterface {

  /**
   * {@inheritdoc}
   */
  public static function getPmContentEntityBaseFieldNames() {
    return [
      'pm_key',
      'pm_project',
      'pm_status',
      'pm_priority',
      'pm_assignee',
      'pm_reviewer',
      'pm_date',
    ];
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc