Exemple #1
0
 public function __construct($name = null, $load_data = true)
 {
     parent::__construct();
     $this->repository = $this->em->getRepository('Modules\\Entities\\Module');
     if (empty($name)) {
         return 'Модуль не найден';
     }
     $this->name = $name;
     $this->group = $this->getGroup();
     if (empty($this->group)) {
         return 'Модуль не найден';
     }
     $this->info = $this->getInfo();
     if ($load_data) {
         $module = $this->find(array('name' => $this->name));
         if (empty($module)) {
             return 'Модуль не найден';
         }
         $this->id = $module->id;
         $this->title = $module->title;
         $this->group = $module->group;
         $this->active = $module->active;
         $this->install = $module->install;
         $this->version = $module->version;
     }
 }
Exemple #2
0
 public function delete($id)
 {
     parent::delete($id);
     /* ToDo
      *
      * Удалить соответствующее разрешении в модуле Users
      */
 }
Exemple #3
0
 public function delete($id)
 {
     /* ToDo
      *
      * Удалить все поля этого типа данных
      */
     parent::delete($id);
 }
Exemple #4
0
 public function __construct()
 {
     parent::__construct();
     $this->repository = $this->em->getRepository('Users\\Entities\\User');
     $login = !empty($_SESSION['user_login']) ? $_SESSION['user_login'] : '';
     if (!empty($login)) {
         $data = $this->repository->findOneBy(array('login' => $login));
         $this->setData($data);
     } else {
         $this->group = 16;
     }
 }
Exemple #5
0
 public function __construct()
 {
     parent::__construct();
     $this->repository = $this->em->getRepository('Data\\Entities\\DataTemplate');
 }
Exemple #6
0
 public function __construct()
 {
     parent::__construct();
     $this->repository = $this->em->getRepository('Events\\Entities\\Action');
 }
Exemple #7
0
 public function __construct()
 {
     parent::__construct();
     $this->repository = $this->em->getRepository('Users\\Entities\\UserGroup');
 }
Exemple #8
0
 public function __construct()
 {
     parent::__construct();
 }
Exemple #9
0
 public function __construct()
 {
     parent::__construct();
     $this->repository = $this->em->getRepository('Settings\\Entities\\Setting');
 }
Exemple #10
0
 public function __construct()
 {
     parent::__construct();
     $this->repository = $this->em->getRepository('Router\\Entities\\Route');
 }
Exemple #11
0
 public function __construct()
 {
     parent::__construct();
     $this->repository = $this->em->getRepository('Mail\\Entities\\Mail');
 }
Exemple #12
0
 public function __construct()
 {
     parent::__construct();
     $this->repository = $this->em->getRepository('Wysiwygs\\Entities\\Wysiwyg');
 }
Exemple #13
0
 public function __construct()
 {
     parent::__construct();
     $this->repository = $this->em->getRepository('Blocks\\Entities\\Block');
 }