6 declare(strict_types=1);
25 private $getSourceSelectionAlgorithmList;
30 private $getDefaultSourceSelectionAlgorithmCode;
42 $this->targetName = $targetName;
43 $this->getSourceSelectionAlgorithmList = $getSourceSelectionAlgorithmList;
44 $this->getDefaultSourceSelectionAlgorithmCode = $getDefaultSourceSelectionAlgorithmCode;
54 $defaultSAlgorithmCode = $this->getDefaultSourceSelectionAlgorithmCode->execute();
56 'label' =>
__(
'Source Selection Algorithm'),
63 'targetName' => $this->targetName,
64 'actionName' =>
'processAlgorithm',
68 'algorithmCode' => $defaultSAlgorithmCode,
89 $algorithmsList = $this->getSourceSelectionAlgorithmList->execute();
90 $splitButtonOptions = [];
91 foreach ($algorithmsList as $algorithm) {
92 $splitButtonOptions[] = [
93 'label' => $algorithm->getTitle(),
99 'targetName' => $this->targetName,
100 'actionName' =>
'processAlgorithm',
104 'algorithmCode' => $algorithm->getCode(),
115 return $splitButtonOptions;
__construct(string $targetName, GetSourceSelectionAlgorithmListInterface $getSourceSelectionAlgorithmList, GetDefaultSourceSelectionAlgorithmCodeInterface $getDefaultSourceSelectionAlgorithmCode)
getAlgorithmsListOptions()