Added actor-case relation

This commit is contained in:
2021-08-26 17:55:07 +01:00
parent 8cb50d271b
commit c7d36df842
33 changed files with 2106 additions and 1 deletions

View File

@ -0,0 +1,39 @@
<?php
namespace Drupal\opencase_cases;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityListBuilder;
use Drupal\Core\Link;
/**
* Defines a class to build a listing of Actor-Case Relation entities.
*
* @ingroup opencase_cases
*/
class OCActorCaseRelationListBuilder extends EntityListBuilder {
/**
* {@inheritdoc}
*/
public function buildHeader() {
$header['id'] = $this->t('Actor-Case Relation ID');
$header['name'] = $this->t('Name');
return $header + parent::buildHeader();
}
/**
* {@inheritdoc}
*/
public function buildRow(EntityInterface $entity) {
/* @var \Drupal\opencase_cases\Entity\OCActorCaseRelation $entity */
$row['id'] = $entity->id();
$row['name'] = Link::createFromRoute(
$entity->label(),
'entity.oc_actor_case_relation.edit_form',
['oc_actor_case_relation' => $entity->id()]
);
return $row + parent::buildRow($entity);
}
}