Namespace
  Drupal\colorbox
File
  - 
              src/ActivationCheck.php
    
   
  
    View source
  
  <?php
namespace Drupal\colorbox;
use Drupal\Core\Config\ConfigFactoryInterface;
use Symfony\Component\HttpFoundation\RequestStack;
class ActivationCheck implements ActivationCheckInterface {
    
    protected $settings;
    
    protected $request;
    
    public function __construct(ConfigFactoryInterface $config, RequestStack $request) {
        $this->settings = $config->get('colorbox.settings');
        $this->request = $request->getCurrentRequest();
    }
    
    public function isActive() {
        return $this->request
            ->get('colorbox') !== 'no';
    }
}
 
Classes
  
    
      
      
      
        
      
                                                  | Title | Deprecated | Summary | 
    
    
          
                                                                                        | ActivationCheck |  | Implementation of ActivationCheckInterface. |