ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilTestPage.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
28{
29 public function getParentType(): string
30 {
31 return 'tst';
32 }
33
34 public function createPageWithNextId(): int
35 {
36 $query = $this->db->query('SELECT max(page_id) as last_id FROM page_object WHERE parent_type="'
37 . $this->getParentType() . '"');
38 try {
39 $assoc = $this->db->fetchAssoc($query);
40 $this->setId(
41 $assoc['last_id'] + 1
42 );
43 $this->createFromXML();
44 } catch (ilDatabaseException $e) {
45 $this->createPageWithNextId();
46 }
47
48 return $this->getId();
49 }
50}
Class ilDatabaseException.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
createFromXML()
Create new page object with current xml content.
@ilCtrl_Calls ilTestEditPageGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMDEditorGUI @ilCtrl_Calls ilT...