You are here

RocketChatGroupEntity.php in Rocket.Chat 8.2

File

modules/rocket_chat_group/src/Entity/RocketChatGroupEntity.php
View source
<?php

namespace Drupal\rocket_chat_group\Entity;

use Drupal\group\Entity\Group;
use Drupal\rocket_chat_api\RocketChat\Element\Channel;

/*
 * Class RocketChatGroupEntity
 *
 * @package Drupal\rocket_chat_group\Entity
 *
 * @ContentEntityType(
 *   id = "group",
 *   label = @Translation("Group"),
 *   label_singular = @Translation("group"),
 *   label_plural = @Translation("groups"),
 *   label_count = @PluralTranslation(
 *     singular = "@count group",
 *     plural = "@count groups"
 *   ),
 *   bundle_label = @Translation("Group type"),
 *   handlers = {
 *     "view_builder" = "Drupal\group\Entity\ViewBuilder\GroupViewBuilder",
 *     "views_data" = "Drupal\group\Entity\Views\GroupViewsData",
 *     "list_builder" = "Drupal\group\Entity\Controller\GroupListBuilder",
 *     "route_provider" = {
 *       "html" = "Drupal\group\Entity\Routing\GroupRouteProvider",
 *     },
 *     "form" = {
 *       "add" = "Drupal\group\Entity\Form\GroupForm",
 *       "edit" = "Drupal\group\Entity\Form\GroupForm",
 *       "delete" = "Drupal\group\Entity\Form\GroupDeleteForm",
 *     },
 *     "access" = "Drupal\group\Entity\Access\GroupAccessControlHandler",
 *   },
 *   admin_permission = "administer group",
 *   base_table = "groups",
 *   data_table = "groups_field_data",
 *   translatable = TRUE,
 *   entity_keys = {
 *     "id" = "id",
 *     "uuid" = "uuid",
 *     "langcode" = "langcode",
 *     "bundle" = "type",
 *     "label" = "label",
 *     "channelName" = "channelName",
 *     "channelType" = "channelType"
 *   },
 *   links = {
 *     "add-form" = "/group/add/{group_type}",
 *     "add-page" = "/group/add",
 *     "canonical" = "/group/{group}",
 *     "collection" = "/admin/group",
 *     "edit-form" = "/group/{group}/edit",
 *     "delete-form" = "/group/{group}/delete"
 *   },
 *   bundle_entity_type = "group_type",
 *   field_ui_base_route = "entity.group_type.edit_form",
 *   permission_granularity = "bundle"
 * )
 */

/**
 *
 */
class RocketChatGroupEntity extends Group {
  protected $channelName = "";
  protected $channeltype = Channel::DEFAULT_CHANNEL_TYPE;
  function getFields($include_computed = TRUE) {
    return parent::getFields($include_computed);

    // TODO: Change the autogenerated stub
  }

}

Classes