mode; } /** * The sort the widget is booted with. * * The first configured sort mapping's slug, or null when none is bound. * Seeded as `orderBy` so the widget's own data source and the server- * rendered card list request the same ordered set: two loaders of one * feed must agree on the order, or the cards and the markers disagree * on what comes first. Mirrors the Drupal module. */ public function initial_order_by(): ?string { $slug = array_key_first( $this->sort_mappings ); return null === $slug ? null : (string) $slug; } }