CodeExplorer setNavigation example
return $criteriaCollection;
} public function enrich(CmsSlotEntity
$slot, ResolverContext
$resolverContext, ElementDataCollection
$result): void
{ $config =
$slot->
getFieldConfig();
$imageSlider =
new ImageSliderStruct();
$slot->
setData($imageSlider);
$navigation =
$config->
get('navigation'
);
if ($navigation !== null &&
$navigation->
isStatic()) { $imageSlider->
setNavigation($navigation->
getArrayValue());
} $sliderItemsConfig =
$config->
get('sliderItems'
);
if ($sliderItemsConfig === null
) { return;
} if ($sliderItemsConfig->
isStatic()) { foreach ($sliderItemsConfig->
getArrayValue() as $sliderItem) { $this->
addMedia($slot,
$imageSlider,
$result,
$sliderItem);
} }