parent
7f39c01d87
commit
e9c2f2a2b0
12 changed files with 212 additions and 67 deletions
|
@ -7,7 +7,7 @@ namespace Drupal\opdavies_blog\Entity\Node;
|
|||
use Drupal\discoverable_entity_bundle_classes\ContentEntityBundleInterface;
|
||||
use Drupal\node\Entity\Node;
|
||||
use Drupal\taxonomy\Entity\Term;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Defines an blog post node class.
|
||||
|
|
|
@ -10,7 +10,7 @@ use Drupal\Core\Routing\CurrentRouteMatch;
|
|||
use Drupal\opdavies_blog\Entity\Node\Post;
|
||||
use Drupal\opdavies_blog\Repository\RelatedPostsRepository;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* @Block(
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Drupal\opdavies_blog\Repository;
|
|||
|
||||
use Drupal\Core\Entity\EntityStorageInterface;
|
||||
use Drupal\Core\Entity\EntityTypeManagerInterface;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
final class PostRepository {
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ use Drupal\Core\Entity\Query\QueryInterface;
|
|||
use Drupal\node\NodeInterface;
|
||||
use Drupal\opdavies_blog\Entity\Node\Post;
|
||||
use Drupal\taxonomy\TermInterface;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
final class RelatedPostsRepository {
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ use Drupal\node\Entity\Node;
|
|||
use Drupal\opdavies_blog\Entity\Node\Post;
|
||||
use Drupal\taxonomy\Entity\Term;
|
||||
use Drupal\taxonomy\TermInterface;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
final class PostFactory {
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Drupal\opdavies_talks\Collection;
|
|||
|
||||
use Drupal\opdavies_talks\Entity\Node\Talk;
|
||||
use Drupal\paragraphs\ParagraphInterface;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
final class TalkCollection extends Collection {
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Drupal\opdavies_talks\Entity\Node;
|
|||
use Drupal\discoverable_entity_bundle_classes\ContentEntityBundleInterface;
|
||||
use Drupal\node\Entity\Node;
|
||||
use Drupal\paragraphs\ParagraphInterface;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Defines an talk node class.
|
||||
|
|
|
@ -10,7 +10,7 @@ use Drupal\hook_event_dispatcher\HookEventDispatcherInterface;
|
|||
use Drupal\opdavies_talks\Entity\Node\Talk;
|
||||
use Drupal\paragraphs\ParagraphInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Update a talk node before it's saved.
|
||||
|
@ -44,6 +44,7 @@ final class UpdateTalkNodeBeforeSave implements EventSubscriberInterface {
|
|||
|
||||
// If the original event IDs don't match the sorted event IDs, update the
|
||||
// event field to use the sorted ones.
|
||||
// @phpstan-ignore-next-line
|
||||
if ($events->map->id() != $eventsByDate->map->id()) {
|
||||
$talk->setEvents($eventsByDate->toArray());
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Drupal\Tests\opdavies_talks\Kernel;
|
|||
|
||||
use Carbon\Carbon;
|
||||
use Drupal\views\ResultRow;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
final class TalksPageSortTest extends TalksTestBase {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue