Definition at line 29 of file TourManager.php.
◆ __construct()
◆ anyActive()
| ILIAS\Help\GuidedTour\Tour\TourManager::anyActive |
( |
| ) |
|
Definition at line 68 of file TourManager.php.
68 : bool
69 {
70 if (!is_null($this->any_active)) {
72 }
73 foreach ($this->
getAll() as $tour) {
74 $settings = $this->sm->getByObjId($tour->getId());
75 if ($settings?->isActive()) {
76 $this->any_active = true;
77 return true;
78 }
79 }
80 $this->any_active = false;
81 return false;
82 }
◆ createTour()
| ILIAS\Help\GuidedTour\Tour\TourManager::createTour |
( |
string |
$title, |
|
|
string |
$description |
|
) |
| |
Definition at line 41 of file TourManager.php.
44 : int {
46 $tour_obj->setTitle($title);
47 $tour_obj->setDescription($description);
48 $tour_obj->create();
49 $this->sm->save($this->data->settings(
50 $tour_obj->getId(),
51 false,
52 "",
53 PermissionType::None
54 ));
55 return $tour_obj->getId();
56 }
◆ deleteTour()
| ILIAS\Help\GuidedTour\Tour\TourManager::deleteTour |
( |
int |
$obj_id | ) |
|
Definition at line 89 of file TourManager.php.
91 : void {
93 $tour_obj->delete();
94 }
◆ getAll()
| ILIAS\Help\GuidedTour\Tour\TourManager::getAll |
( |
| ) |
|
- Returns
- \Generator<ilObjGuidedTour>
Definition at line 61 of file TourManager.php.
61 : \Generator
62 {
64 yield \ilObjectFactory::getInstanceByObjId($tour["obj_id"]);
65 }
66 }
static _getObjectsByType(string $obj_type="", ?int $owner=null)
References ilObject\_getObjectsByType().
◆ getByObjId()
| ILIAS\Help\GuidedTour\Tour\TourManager::getByObjId |
( |
int |
$obj_id | ) |
|
Definition at line 84 of file TourManager.php.
85 {
86 return \ilObjectFactory::getInstanceByObjId($obj_id);
87 }
◆ $any_active
| bool ILIAS\Help\GuidedTour\Tour\TourManager::$any_active = null |
|
protected |
◆ $sm
The documentation for this class was generated from the following file: