ManageEnrollmentAccess.php in Open Social 10.0.x
Same filename and directory in other branches
- 8.9 modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/views/access/ManageEnrollmentAccess.php
- 8.3 modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/views/access/ManageEnrollmentAccess.php
- 8.4 modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/views/access/ManageEnrollmentAccess.php
- 8.5 modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/views/access/ManageEnrollmentAccess.php
- 8.6 modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/views/access/ManageEnrollmentAccess.php
- 8.7 modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/views/access/ManageEnrollmentAccess.php
- 8.8 modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/views/access/ManageEnrollmentAccess.php
- 10.3.x modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/views/access/ManageEnrollmentAccess.php
- 10.1.x modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/views/access/ManageEnrollmentAccess.php
- 10.2.x modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/views/access/ManageEnrollmentAccess.php
File
modules/social_features/social_event/modules/social_event_an_enroll/src/Plugin/views/access/ManageEnrollmentAccess.phpView source
<?php
namespace Drupal\social_event_an_enroll\Plugin\views\access;
use Drupal\Core\Session\AccountInterface;
use Symfony\Component\Routing\Route;
use Drupal\views\Plugin\views\access\AccessPluginBase;
/**
* Manage enrollment page access plugin.
*
* @ingroup views_access_plugins
*
* @ViewsAccess(
* id = "manage_enrollment_access",
* title = @Translation("Manage enrollment access"),
* help = @Translation("Access to the event manage enrollment page.")
* )
*/
class ManageEnrollmentAccess extends AccessPluginBase {
/**
* {@inheritdoc}
*/
public function summaryTitle() {
return $this
->t('Unrestricted');
}
/**
* {@inheritdoc}
*/
public function access(AccountInterface $account) {
// Allow here, since real access is checked in alterRouteDefinition().
return TRUE;
}
/**
* {@inheritdoc}
*/
public function alterRouteDefinition(Route $route) {
$route
->setRequirement('_custom_access', '\\Drupal\\social_event_an_enroll\\Controller\\EventAnEnrollController::enrollManageAccess');
}
}
Classes
Name | Description |
---|---|
ManageEnrollmentAccess | Manage enrollment page access plugin. |