/**
  * Inject global data to controller and share it with views
  *
  * @var FrontGlobalData|null
  * @param FrontGlobalData $GlobalData
  */
 public function __construct(FrontGlobalData $GlobalData)
 {
     $this->GlobalData = $GlobalData;
     //-- Set theme properties
     $this->GlobalData->theme_layout = 'default';
     $this->theme = $this->GlobalData->getTheme();
     //-- Sharing with views
     View::share('GlobalData', $this->GlobalData);
 }
 public function __construct(FrontGlobalData $GlobalData, ContactUsCacheDB $ContactData)
 {
     //-- Push injecting objects
     $this->GlobalData = $GlobalData;
     $this->ContactData = $ContactData;
     //-- Set theme properties
     $this->GlobalData->theme_layout = 'default';
     $this->theme = $this->GlobalData->getTheme();
     //-- Sharing with views
     View::share('GlobalData', $this->GlobalData);
 }