openquestions-1.0.x-dev/src/Entity/OqItemType.php

src/Entity/OqItemType.php
<?php

namespace Drupal\openquestions\Entity;

use Drupal\Core\Config\Entity\ConfigEntityBundleBase;

/**
 * Defines the OQ Item type configuration entity.
 *
 * @ConfigEntityType(
 *   id = "oq_item_type",
 *   label = @Translation("OQ Item type"),
 *   label_collection = @Translation("OQ Item types"),
 *   label_singular = @Translation("oq item type"),
 *   label_plural = @Translation("oq items types"),
 *   label_count = @PluralTranslation(
 *     singular = "@count oq items type",
 *     plural = "@count oq items types",
 *   ),
 *   handlers = {
 *     "form" = {
 *       "add" = "Drupal\openquestions\Form\OqItemTypeForm",
 *       "edit" = "Drupal\openquestions\Form\OqItemTypeForm",
 *       "delete" = "Drupal\Core\Entity\EntityDeleteForm",
 *     },
 *     "list_builder" = "Drupal\openquestions\List\OqItemTypeListBuilder",
 *     "route_provider" = {
 *       "html" = "Drupal\Core\Entity\Routing\AdminHtmlRouteProvider",
 *     }
 *   },
 *   admin_permission = "administer oq item types",
 *   bundle_of = "oq_item",
 *   config_prefix = "oq_item_type",
 *   entity_keys = {
 *     "id" = "id",
 *     "label" = "label",
 *     "uuid" = "uuid"
 *   },
 *   links = {
 *     "add-form" = "/admin/structure/oq_item_types/add",
 *     "edit-form" = "/admin/structure/oq_item_types/manage/{oq_item_type}",
 *     "delete-form" = "/admin/structure/oq_item_types/manage/{oq_item_type}/delete",
 *     "collection" = "/admin/structure/oq_item_types"
 *   },
 *   config_export = {
 *     "id",
 *     "label",
 *     "uuid",
 *   }
 * )
 */
class OqItemType extends ConfigEntityBundleBase {

  /**
   * The machine name of this oq item type.
   *
   * @var string
   */
  protected $id;

  /**
   * The human-readable name of the oq item type.
   *
   * @var string
   */
  protected $label;

}

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

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