private function getStepCount() { $steps = 0; foreach ($this->getAllowedQueue() as $templateGenerator) { if ($templateGenerator instanceof StepCounterInterface) { $steps += $templateGenerator->getStepCount(); } } return $steps; }