if ($element->inActiveTrail
) { $return['in_active_trail'
] = TRUE;
} return $return;
};
// The three access scenarios described in this method's documentation.
$access_scenarios =
[ [NULL,
[]],
[AccessResult::
allowed(),
['access:allowed'
]],
[AccessResult::
neutral(),
['access:neutral'
]],
];
// The two links scenarios described in this method's documentation.
$cache_defaults =
['cache_max_age' => Cache::PERMANENT, 'cache_tags' =>
[]];
$links_scenarios =
[ [ MenuLinkMock::
create(['id' => 'test.example1', 'route_name' => 'example1', 'title' => 'Example 1'
]),
MenuLinkMock::
create(['id' => 'test.example2', 'route_name' => 'example1', 'title' => 'Example 2', 'metadata' =>
['cache_contexts' =>
['llama'
]] +
$cache_defaults]),
],
[