src/PeskyCMF/UI/CmfUIModule.php
public function getValuesForMenuItemsCounters(): array {
        $counters = [];
        /** @var ScaffoldConfigInterface $scaffoldConfigClass */
        foreach ($this->getResources() as $scaffoldConfigClass) {
            $counterClosure = $scaffoldConfigClass::getMenuItemCounterValue();
            if (!empty($counterClosure)) {
                $counters[$scaffoldConfigClass::getMenuItemCounterName()] = value($counterClosure);
            }
        }
        return $counters;
    }
public function getValuesForMenuItemsCounters(): array {
        $counters = [];
        /** @var ScaffoldConfigInterface $scaffoldConfigClass */
        foreach ($this->getResources() as $scaffoldConfigClass) {
            $counterClosure = $scaffoldConfigClass::getMenuItemCounterValue();
            if (!empty($counterClosure)) {
                $counters[$scaffoldConfigClass::getMenuItemCounterName()] = value($counterClosure);
            }
        }
        return $counters;
    }
public function getValuesForMenuItemsCounters ( ) : array { $ counters = [ ] ; /** @var ScaffoldConfigInterface $scaffoldConfigClass */ foreach ( $ this -> getResources ( ) as $ scaffoldConfigClass ) { $ counterClosure = $ scaffoldConfigClass :: getMenuItemCounterValue ( ) ; if ( ! empty ( $ counterClosure ) ) { $ counters [ $ scaffoldConfigClass :: getMenuItemCounterName ( ) ] = value ( $ counterClosure ) ; } } return $ counters ; }
Get values for menu items counters (details in CmfConfig::menu())
@return array like ['pending_orders' => '<span class="label label-primary pull-right">2</span>']
Get values for menu items counters ( details in CmfConfig :: menu () )