You are here

class SplashifyPath in Splashify 8.2

Disable cache if splash exist.

Hierarchy

Expanded class hierarchy of SplashifyPath

1 string reference to 'SplashifyPath'
splashify.services.yml in ./splashify.services.yml
splashify.services.yml
1 service uses SplashifyPath
splashify.page_cache_request_policy.splashify_path in ./splashify.services.yml
Drupal\splashify\PageCache\SplashifyPath

File

src/PageCache/SplashifyPath.php, line 11

Namespace

Drupal\splashify\PageCache
View source
class SplashifyPath implements RequestPolicyInterface {

  /**
   * {@inheritdoc}
   */
  public function check(Request $request) {
    if (\Drupal::service('splashify.injection')
      ->isSplashExist($request)) {
      \Drupal::service('page_cache_kill_switch')
        ->trigger();
      return static::DENY;
    }
    return static::ALLOW;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
RequestPolicyInterface::ALLOW constant Allow delivery of cached pages.
RequestPolicyInterface::DENY constant Deny delivery of cached pages.
SplashifyPath::check public function Determines whether delivery of a cached page should be attempted. Overrides RequestPolicyInterface::check