ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
StepRetrieval.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Help\GuidedTour;
22
27
29{
30 protected \ILIAS\Help\GuidedTour\Step\StepManager $step_manager;
31
32 public function __construct(
33 protected InternalDomainService $domain,
34 protected int $tour_id
35 ) {
36 $this->step_manager = $domain->step();
37 }
38
39 public function getData(
40 array $fields,
41 ?Range $range = null,
42 ?Order $order = null,
43 array $filter = [],
44 array $parameters = []
45 ): \Generator {
46 foreach ($this->step_manager->getStepsOfTour($this->tour_id) as $step) {
47 yield [
48 "id" => $step->getId(),
49 "type" => $this->step_manager->getStepName($step->getType()),
50 "element_id" => $step->getElementId()
51 ];
52 }
53 }
54
55 public function count(
56 array $filter = [],
57 array $parameters = []
58 ): int {
59 return $this->step_manager->countStepsOfTour($this->tour_id);
60 }
61
62 public function isFieldNumeric(string $field): bool
63 {
64 return false;
65 }
66}
Both the subject and the direction need to be specified when expressing an order.
Definition: Order.php:29
A simple class to express a naive range of whole positive numbers.
Definition: Range.php:29
count(array $filter=[], array $parameters=[])
ILIAS Help GuidedTour Step StepManager $step_manager
getData(array $fields, ?Range $range=null, ?Order $order=null, array $filter=[], array $parameters=[])
__construct(protected InternalDomainService $domain, protected int $tour_id)
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...