You are here

ProductAccessCheck.php in Ubercart 8.4

File

uc_product/src/Access/ProductAccessCheck.php
View source
<?php

namespace Drupal\uc_product\Access;

use Drupal\Core\Access\AccessResult;
use Drupal\Core\Routing\Access\AccessInterface;
use Drupal\node\NodeInterface;

/**
 * Provides an access checker for products.
 */
class ProductAccessCheck implements AccessInterface {

  /**
   * {@inheritdoc}
   */
  public function access(NodeInterface $node) {
    return AccessResult::allowedIf(uc_product_is_product($node));
  }

}

Classes

Namesort descending Description
ProductAccessCheck Provides an access checker for products.