Ejemplo n.º 1
0
 public function loadFromConfiguration($configuration)
 {
     foreach ($configuration['dashboard']['items'] as $key => $item) {
         $title = $item['title'] ? $item['title'] : $key;
         $icon = $item['icon'] ? $item['icon'] : 'default.png';
         $dashboardItem = new DashboardItem();
         $dashboardItem->setKey($key)->setActive($item['active'])->setTitle($title)->setRoute($item['route'])->setIcon($icon);
         $this->items[$dashboardItem->getKey()] = $dashboardItem;
     }
 }
Ejemplo n.º 2
0
 public function addChild(DashboardItem $child)
 {
     $child->setGroup($this);
     $name = $child->getName();
     if (!isset($this->children[$name])) {
         $this->children[$name] = $child;
     } else {
         if ($this->children[$name] !== $child) {
             throw new \Exception("duplicate child");
         }
     }
 }
Ejemplo n.º 3
0
 public function __construct(SmartyPage $smarty)
 {
     parent::__construct($smarty);
     $this->presenter = new UpcomingReservationsPresenter($this, new ReservationViewRepository());
     $this->DBconn = ServiceLocator::GetDatabase();
 }
Ejemplo n.º 4
0
 public function __construct(SmartyPage $smarty)
 {
     parent::__construct($smarty);
     $this->_presenter = new AnnouncementPresenter($this);
 }
Ejemplo n.º 5
0
 public function __construct(SmartyPage $smarty)
 {
     parent::__construct($smarty);
     $this->presenter = new ResourceAvailabilityControlPresenter($this, new ResourceService(new ResourceRepository(), PluginManager::Instance()->LoadPermission(), new AttributeService(new AttributeRepository()), new UserRepository()), new ReservationViewRepository());
 }
Ejemplo n.º 6
0
 public function __construct(SmartyPage $smarty)
 {
     parent::__construct($smarty);
     $this->presenter = new UpcomingReservationsPresenter($this, new ReservationViewRepository());
 }