give-8.x-1.0-beta13/src/Entity/DonationAccessControlHandler.php

src/Entity/DonationAccessControlHandler.php
<?php

namespace Drupal\give\Entity;

use Drupal\Core\Access\AccessResult;
use Drupal\Core\Entity\EntityAccessControlHandler;
use Drupal\Core\Session\AccountInterface;

/**
 * Defines the access control handler for the donation form entity type.
 *
 * @see \Drupal\give\Entity\Donation.
 */
class DonationAccessControlHandler extends EntityAccessControlHandler {

  /**
   * {@inheritdoc}
   */
  protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
    return AccessResult::allowedIfHasPermission($account, 'access give forms');
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc