pm-4.1.x-dev/modules/pm_invoice/src/Entity/PmInvoice.php

modules/pm_invoice/src/Entity/PmInvoice.php
<?php

namespace Drupal\pm_invoice\Entity;

use Drupal\pm_invoice\PmInvoiceInterface;
use Drupal\pm\PmContentEntityBase;

/**
 * Defines the Invoice entity class.
 *
 * @ContentEntityType(
 *   id = "pm_invoice",
 *   label = @Translation("Invoice"),
 *   label_collection = @Translation("Invoices"),
 *   label_singular = @Translation("Invoice"),
 *   label_plural = @Translation("Invoices"),
 *   label_count = @PluralTranslation(
 *     singular = "@count Invoices",
 *     plural = "@count Invoices",
 *   ),
 *   bundle_label = @Translation("Invoice type"),
 *   handlers = {
 *     "list_builder" = "Drupal\pm_invoice\PmInvoiceListBuilder",
 *     "views_data" = "Drupal\views\EntityViewsData",
 *     "access" = "Drupal\pm_invoice\PmInvoiceAccessControlHandler",
 *     "form" = {
 *       "add" = "Drupal\pm_invoice\Form\PmInvoiceForm",
 *       "edit" = "Drupal\pm_invoice\Form\PmInvoiceForm",
 *       "delete" = "Drupal\Core\Entity\ContentEntityDeleteForm",
 *     },
 *     "route_provider" = {
 *       "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider",
 *     }
 *   },
 *   base_table = "pm_invoice",
 *   admin_permission = "administer pm invoice types",
 *   entity_keys = {
 *     "id" = "id",
 *     "bundle" = "bundle",
 *     "label" = "label",
 *     "uuid" = "uuid",
 *     "owner" = "uid",
 *   },
 *   links = {
 *     "collection" = "/admin/pm/invoice",
 *     "add-form" = "/pm/invoice/add/{pm_invoice_type}",
 *     "add-page" = "/pm/invoice/add",
 *     "canonical" = "/pm/invoice/{pm_invoice}",
 *     "edit-form" = "/pm/invoice/{pm_invoice}/edit",
 *     "delete-form" = "/pm/invoice/{pm_invoice}/delete",
 *   },
 *   bundle_entity_type = "pm_invoice_type",
 *   field_ui_base_route = "entity.pm_invoice_type.edit_form",
 * )
 */
class PmInvoice extends PmContentEntityBase implements PmInvoiceInterface {

  /**
   * {@inheritdoc}
   */
  public static function getPmContentEntityBaseFieldNames() {
    return [
      'pm_project',
    ];
  }

}

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

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