Compare commits

..

No commits in common. "d9e10606416f15effdd43312d36da61a2d34c44e" and "1383153957d6cb2b9744b213c7def6c641a5a0de" have entirely different histories.

3 changed files with 8 additions and 6 deletions

View file

@ -20,7 +20,7 @@ interface ServiceInterface
/** /**
* @param string|null $forPath * @param string|null $forPath
* *
* @return \Iterator * @return array|\Iterator
*/ */
public function getItems(string $forPath = null): \Iterator; public function getItems(string $forPath = null): \Iterator;
} }

View file

@ -15,6 +15,8 @@ namespace DigiComp\Menu\MenuService;
use Neos\Flow\Annotations as Flow; use Neos\Flow\Annotations as Flow;
/** /**
* @package DigiComp\Menu\Menu
*
* @Flow\Scope("singleton") * @Flow\Scope("singleton")
*/ */
class SettingsService implements ServiceInterface class SettingsService implements ServiceInterface
@ -38,9 +40,9 @@ class SettingsService implements ServiceInterface
$items = &$this->menuConfiguration; $items = &$this->menuConfiguration;
} }
if ($items) { if ($items) {
\uasort( uasort(
$items, $items,
static function ($a, $b) { function ($a, $b) {
return $a['sorting'] > $b['sorting']; return $a['sorting'] > $b['sorting'];
} }
); );

View file

@ -53,13 +53,13 @@ class ProgressViewHelper extends AbstractViewHelper
{ {
$links = $activeStep = $returnable = $stepsAs = $backLinkAs = $activeStepAs = $linksAs = $links = $activeStep = $returnable = $stepsAs = $backLinkAs = $activeStepAs = $linksAs =
$activeStepLinkAs = $offset = $linkCount = null; $activeStepLinkAs = $offset = $linkCount = null;
\extract($this->arguments, \EXTR_OVERWRITE); extract($this->arguments);
//handling famous off by one //handling famous off by one
$activeStep -= $offset; $activeStep -= $offset;
//make sure our array index is numeric //make sure our array index is numeric
$links = \array_values($links); $links = array_values($links);
if (!$linkCount) { if (!$linkCount) {
$linkCount = \count($links); $linkCount = count($links);
} }
foreach ($links as $i => &$link) { foreach ($links as $i => &$link) {
$link['completed'] = $activeStep > $i; $link['completed'] = $activeStep > $i;