class DashboardService in Content Planner 8
Class DashboardService.
Hierarchy
- class \Drupal\content_planner\DashboardService
Expanded class hierarchy of DashboardService
1 file declares its use of DashboardService
- DashboardController.php in src/
Controller/ DashboardController.php
1 string reference to 'DashboardService'
1 service uses DashboardService
File
- src/
DashboardService.php, line 8
Namespace
Drupal\content_plannerView source
class DashboardService {
/**
* The dashboard settings service.
*
* @var \Drupal\content_planner\DashboardSettingsService
*/
protected $dashboardSettingsService;
/**
* Constructs a new DashboardService object.
*/
public function __construct(DashboardSettingsService $dashboard_settings_service) {
$this->dashboardSettingsService = $dashboard_settings_service;
}
/**
* Gets the dashboard settings.
*
* @return \Drupal\Core\Config\ImmutableConfig
* The current dashboard config.
*/
public function getDashboardSettings() {
return $this->dashboardSettingsService
->getSettings();
}
/**
* Check if the Content Calendar is enabled.
*
* @return bool
* TRUE if the content calendar is enabled.
*/
public function isContentCalendarEnabled() {
return \Drupal::moduleHandler()
->moduleExists('content_calendar');
}
/**
* Check if the Content Kanban is enabled.
*
* @return bool
* TRUE if the kanban calendar is enabled.
*/
public function isContentKanbanEnabled() {
return \Drupal::moduleHandler()
->moduleExists('content_kanban');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DashboardService:: |
protected | property | The dashboard settings service. | |
DashboardService:: |
public | function | Gets the dashboard settings. | |
DashboardService:: |
public | function | Check if the Content Calendar is enabled. | |
DashboardService:: |
public | function | Check if the Content Kanban is enabled. | |
DashboardService:: |
public | function | Constructs a new DashboardService object. |