pm-4.1.x-dev/modules/pm_timetracking/src/Entity/PmTimetracking.php
modules/pm_timetracking/src/Entity/PmTimetracking.php
<?php
namespace Drupal\pm_timetracking\Entity;
use Drupal\pm\PmContentEntityBase;
use Drupal\pm_timetracking\PmTimetrackingInterface;
/**
* Defines the Time-tracking entity class.
*
* @ContentEntityType(
* id = "pm_timetracking",
* label = @Translation("Time-tracking"),
* label_collection = @Translation("Time-trackings"),
* label_singular = @Translation("Time-tracking"),
* label_plural = @Translation("Time-trackings"),
* label_count = @PluralTranslation(
* singular = "@count Time-trackings",
* plural = "@count Time-trackings",
* ),
* bundle_label = @Translation("Time-tracking type"),
* handlers = {
* "list_builder" = "Drupal\pm_timetracking\PmTimetrackingListBuilder",
* "views_data" = "Drupal\views\EntityViewsData",
* "access" = "Drupal\pm_timetracking\PmTimetrackingAccessControlHandler",
* "form" = {
* "add" = "Drupal\pm_timetracking\Form\PmTimetrackingForm",
* "edit" = "Drupal\pm_timetracking\Form\PmTimetrackingForm",
* "delete" = "Drupal\Core\Entity\ContentEntityDeleteForm",
* },
* "route_provider" = {
* "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider",
* }
* },
* base_table = "pm_timetracking",
* admin_permission = "administer pm timetracking types",
* entity_keys = {
* "id" = "id",
* "bundle" = "bundle",
* "label" = "label",
* "uuid" = "uuid",
* "owner" = "uid",
* },
* links = {
* "collection" = "/admin/pm/timetracking",
* "add-form" = "/pm/timetracking/add/{pm_timetracking_type}",
* "add-page" = "/pm/timetracking/add",
* "canonical" = "/pm/timetracking/{pm_timetracking}",
* "edit-form" = "/pm/timetracking/{pm_timetracking}/edit",
* "delete-form" = "/pm/timetracking/{pm_timetracking}/delete",
* },
* bundle_entity_type = "pm_timetracking_type",
* field_ui_base_route = "entity.pm_timetracking_type.edit_form",
* )
*/
class PmTimetracking extends PmContentEntityBase implements PmTimetrackingInterface {
/**
* {@inheritdoc}
*/
public static function getPmContentEntityBaseFieldNames() {
return [
'pm_project',
];
}
}
