class ActivationCheck in jQuery World Calendars API 3.x
Implementation of ActivationCheckInterface.
Hierarchy
- class \Drupal\jquery_calendar\ActivationCheck implements ActivationCheckInterface
Expanded class hierarchy of ActivationCheck
1 string reference to 'ActivationCheck'
1 service uses ActivationCheck
File
- src/
ActivationCheck.php, line 11
Namespace
Drupal\jquery_calendarView source
class ActivationCheck implements ActivationCheckInterface {
/**
* The settings.
*
* @var \Drupal\Core\Config\ImmutableConfig
*/
protected $settings;
/**
* The request stack.
*
* @var \Symfony\Component\HttpFoundation\RequestStack
*/
protected $request;
/**
* Create an instance of ActivationCheck.
*/
public function __construct(ConfigFactoryInterface $config, RequestStack $request) {
$this->settings = $config
->get('jquery_calendar.settings');
$this->request = $request
->getCurrentRequest();
}
/**
* {@inheritdoc}
*/
public function isActive() {
return true;
return $this->request
->get('colorbox') !== 'no';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ActivationCheck:: |
protected | property | The request stack. | |
ActivationCheck:: |
protected | property | The settings. | |
ActivationCheck:: |
public | function |
Check if library should be activated for the current page. Overrides ActivationCheckInterface:: |
|
ActivationCheck:: |
public | function | Create an instance of ActivationCheck. |