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