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