Test node bundle

This commit is contained in:
Oliver Davies 2024-01-20 09:23:06 +00:00
parent e09fdbe5d0
commit 196b1f1517
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,16 @@
<?php
namespace Drupal\example;
use Drupal\node\NodeInterface;
final class PostWrapper {
public function __construct(private NodeInterface $post) {
}
public function getType(): string {
return $this->post->bundle();
}
}