Exemple #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;
     }
 }
 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");
         }
     }
 }
 public function __construct(SmartyPage $smarty)
 {
     parent::__construct($smarty);
     $this->presenter = new UpcomingReservationsPresenter($this, new ReservationViewRepository());
     $this->DBconn = ServiceLocator::GetDatabase();
 }
 public function __construct(SmartyPage $smarty)
 {
     parent::__construct($smarty);
     $this->_presenter = new AnnouncementPresenter($this);
 }
 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());
 }
 public function __construct(SmartyPage $smarty)
 {
     parent::__construct($smarty);
     $this->presenter = new UpcomingReservationsPresenter($this, new ReservationViewRepository());
 }