Overview

Namespaces

  • App
    • Components
    • Interfaces
    • Lib
      • Files
      • Forms
        • Controls
      • Html
      • Repair
      • Statics
    • Model
    • Modules
      • BaseModule
        • Presenters
      • PartnersModule
        • Presenters
      • ProductModule
        • Presenters
      • SaleModule
        • Model
        • Presenters
      • SettingsModule
        • Model
        • Presenters
      • StoreModule
        • Model
        • Presenters
    • Presenters
    • Router
  • PHP

Classes

  • DateTime
  • SplFileInfo

Interfaces

  • ArrayAccess
  • Countable
  • Exception
  • Iterator
  • Traversable
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Download
 1: <?php   
 2: /**
 3:  * Project sberp
 4:  *
 5:  * @file Tables
 6:  * @author Jaromír Polášek
 7:  * @version 0.8.3.PREMATH
 8:  * Encoding UTF-8
 9:  */
10: namespace App\Modules\SettingsModule\Model;
11: 
12: use Nette\Object,
13:     App\Model\Database,
14:     App\Lib\Repair\Repair,
15:     App\Lib\Statics\Cons;
16: 
17: /**
18:  * Model modulu Settings
19:  */
20: class Tables extends Object{
21:     
22:     /** @var \App\Model\Database Databáze*/
23:     private $database;
24:     
25:     /** @var \App\Lib\Repair\Repair Opravář */
26:     private $repair;
27:     
28:     /** @var boolean $menu */
29:     private $menu = FALSE;
30:     
31:     /**
32:      * Konstruktor vytvoří instanci trídy Repair s ná stroji pro obnovu zdrojů a práv
33:      * @param Database $database
34:      */
35:     public function __construct(Database $database) {
36:        $this->database = $database ;
37:        $this->repair = new Repair($database);
38:     }
39:     
40:     /**
41:      * Nastaví proměnou menu
42:      * @param array $data
43:      */
44:     public function SetSource($data){
45:         if (isset($data[Cons::COLUMN_TYPE]) || isset($data[Cons::TABLE_SOURCE.'_'.Cons::COLUMN_ID])){
46:         $this->menu = TRUE;
47:         }
48:     }
49:     
50:     /**
51:      * Po uložení záznamu upraví zdroje a oprávnění
52:      */
53:     public function Repair(){
54:         if ($this->menu){
55:         $this->repair->rebuildMenu();
56:         }
57:         $this->repair->rebuildTables();
58:         $this->repair->admin();     
59:     }   
60: }
61: 
sberp API API documentation generated by ApiGen