Changeset 887 for trunk/Modules/Meals
- Timestamp:
- Nov 20, 2020, 12:08:12 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Meals/Meals.php
r874 r887 3 3 class PageEatingPlace extends Page 4 4 { 5 var $FullTitle = 'Jídleníček jídelny Na kopečku';6 var $ShortTitle = 'Jídelníček';7 var $ParentClass = 'PagePortal';8 5 var $DayNames = array('Neděle', 'Pondělí', 'Úterý', 'Středa', 'Čtvrtek', 'Pátek', 'Sobota'); 9 6 var $DayNamesShort = array('NE', 'PO', 'ÚT', 'ST', 'ČT', 'PÁ', 'SO'); … … 11 8 var $DayCount = 20; // počet dopředu zobrazených dnů 12 9 13 function Show() 10 function __construct(System $System) 11 { 12 parent::__construct($System); 13 $this->FullTitle = 'Jídleníček jídelny Na kopečku'; 14 $this->ShortTitle = 'Jídelníček'; 15 $this->ParentClass = 'PagePortal'; 16 } 17 18 function Show(): string 14 19 { 15 20 if (count($this->System->PathItems) > 1) … … 21 26 } 22 27 23 function ShowMenu() 28 function ShowMenu(): string 24 29 { 25 30 //echo('Dnes je '.HumanDate(date('Y-m-d')).'<br>'); … … 43 48 } 44 49 45 function ShowPrint() 50 function ShowPrint(): string 46 51 { 47 52 $this->ClearPage = true; … … 94 99 } 95 100 96 function PrintTableRow( $Row)101 function PrintTableRow(array $Row): string 97 102 { 98 103 global $LastWeekOfYear; … … 120 125 } 121 126 122 function ShowEdit() 127 function ShowEdit(): string 123 128 { 124 129 Header('Cache-Control: no-cache'); … … 136 141 } 137 142 $Output .= '<div style="color: red; font-size: larger;">Menu uloženo!</div>'; 138 $this->System->ModuleManager->Modules['Log']->NewRecord('EatingPlace', 'MenuSave');143 ModuleLog::Cast($this->System->GetModule('Log'))->NewRecord('EatingPlace', 'MenuSave'); 139 144 } 140 145 if ($_GET['action'] == 'saveinfo') … … 143 148 $this->Database->insert('MealsInfo', array('Info' => $_POST['info'], 'Price' => $_POST['price'])); 144 149 $Output .= '<div style="color: red; font-size: larger;">Informační údaje uloženy!</div>'; 145 $this->System->ModuleManager->Modules['Log']->NewRecord('EatingPlace', 'InfoSave');150 ModuleLog::Cast($this->System->GetModule('Log'))->NewRecord('EatingPlace', 'InfoSave'); 146 151 } 147 152 } … … 179 184 class ModuleMeals extends AppModule 180 185 { 181 function __construct( $System)186 function __construct(System $System) 182 187 { 183 188 parent::__construct($System); … … 191 196 } 192 197 193 function DoInstall() 194 { 195 } 196 197 function DoUnInstall() 198 { 199 } 200 201 function DoStart() 202 { 203 $this->System->RegisterPage( 'jidelna', 'PageEatingPlace');198 function DoInstall(): void 199 { 200 } 201 202 function DoUnInstall(): void 203 { 204 } 205 206 function DoStart(): void 207 { 208 $this->System->RegisterPage(['jidelna'], 'PageEatingPlace'); 204 209 } 205 210 }
Note:
See TracChangeset
for help on using the changeset viewer.