Skip to content

Commit

Permalink
Issue #3 by gkapoor121212: Error when trying to create an instance of…
Browse files Browse the repository at this point in the history
… Sitedash entity.
  • Loading branch information
gkapoor121212 committed Dec 8, 2021
1 parent 576b3b3 commit 7edceee
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sitedash.info.yml
Expand Up @@ -2,4 +2,4 @@ name: Site Dashboard
description: A single dashboard allowing you to view/manage multiple sites.
package: Site Dashboard
type: module
core_version_requirement: ^8 || ^9
core_version_requirement: ^8.8 || ^9
2 changes: 0 additions & 2 deletions src/Entity/Sitedash.php
Expand Up @@ -6,7 +6,6 @@
use Drupal\Core\Field\BaseFieldDefinition;
use Drupal\Core\Entity\ContentEntityBase;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Entity\EntityChangedTrait;
use Drupal\sitedash\SitedashInterface;
use Drupal\user\UserInterface;

Expand Down Expand Up @@ -126,7 +125,6 @@
*/
class Sitedash extends ContentEntityBase implements SitedashInterface {

use EntityChangedTrait; // Implements methods defined by EntityChangedInterface.

/**
* {@inheritdoc}
Expand Down
3 changes: 1 addition & 2 deletions src/SitedashInterface.php
Expand Up @@ -4,12 +4,11 @@

use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\user\EntityOwnerInterface;
use Drupal\Core\Entity\EntityChangedInterface;

/**
* Provides an interface defining a Contact entity.
* @ingroup sitedash
*/
interface SitedashInterface extends ContentEntityInterface, EntityOwnerInterface, EntityChangedInterface {
interface SitedashInterface extends ContentEntityInterface, EntityOwnerInterface {

}
2 changes: 1 addition & 1 deletion src/SitedashListBuilder.php
Expand Up @@ -53,7 +53,7 @@ public function buildHeader() {
public function buildRow(EntityInterface $entity) {
/* @var $entity \Drupal\sitedash\Entity\Sitedash */
$row['id'] = $entity->id();
$row['name'] = $entity->link();
$row['name'] = $entity->toLink();
$row['siteUrl'] = $entity->siteUrl->value;
return $row + parent::buildRow($entity);
}
Expand Down

0 comments on commit 7edceee

Please sign in to comment.