interface FieldPermissionTypeInterface in Field Permissions 8
Same name and namespace in other branches
- 8.2 src/Plugin/FieldPermissionTypeInterface.php \Drupal\field_permissions\Plugin\FieldPermissionTypeInterface
A field permission type plugin interface.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\DerivativeInspectionInterface
- interface \Drupal\field_permissions\Plugin\FieldPermissionTypeInterface
Expanded class hierarchy of FieldPermissionTypeInterface
All classes that implement FieldPermissionTypeInterface
12 files declare their use of FieldPermissionTypeInterface
- Base.php in src/
Plugin/ FieldPermissionType/ Base.php - FieldPermissionsCommentTest.php in tests/
src/ Functional/ FieldPermissionsCommentTest.php - FieldPermissionsController.php in src/
Controller/ FieldPermissionsController.php - FieldPermissionSettings.php in src/
Plugin/ migrate/ process/ FieldPermissionSettings.php - FieldPermissionsNodeTest.php in tests/
src/ Functional/ FieldPermissionsNodeTest.php
File
- src/
Plugin/ FieldPermissionTypeInterface.php, line 13
Namespace
Drupal\field_permissions\PluginView source
interface FieldPermissionTypeInterface extends PluginInspectionInterface, DerivativeInspectionInterface {
/**
* Indicates that a field does not have field-specific access control.
*
* Public field access is not implemented as a plugin because it effectively
* means this module does not process any access control for fields with this
* type of permission.
*/
const ACCESS_PUBLIC = 'public';
/**
* Indicates that a field is using the private access permission type.
*
* Private fields are never displayed, and are only editable by the author
* (and by site administrators with the 'access private fields' permission).
*
* @internal
*
* This is here as a helper since there are still special handling of the
* various plugins throughout this module.
*
* @see \Drupal\field_permissions\Plugin\FieldPermissionType\PrivateAccess
*/
const ACCESS_PRIVATE = 'private';
/**
* Indicates that a field is using the custom permission type.
*
* @internal
*
* This is here as a helper since there are still special handling of the
* various plugins throughout this module.
*
* @see \Drupal\field_permissions\Plugin\FieldPermissionType\CustomAccess
*/
const ACCESS_CUSTOM = 'custom';
/**
* The permission type label.
*
* @return string
* The field permission type label.
*/
public function getLabel();
/**
* The permission type description.
*
* @return string
* The field permission type description.
*/
public function getDescription();
/**
* Determine if access to the field is granted for a given account.
*
* @param string $operation
* The operation to check. Either 'view' or 'edit'.
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity the field is attached to.
* @param \Drupal\Core\Session\AccountInterface $account
* The user to check access for.
*
* @return bool
* The access result.
*/
public function hasFieldAccess($operation, EntityInterface $entity, AccountInterface $account);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DerivativeInspectionInterface:: |
public | function | Gets the base_plugin_id of the plugin instance. | 1 |
DerivativeInspectionInterface:: |
public | function | Gets the derivative_id of the plugin instance. | 1 |
FieldPermissionTypeInterface:: |
constant | Indicates that a field is using the custom permission type. | ||
FieldPermissionTypeInterface:: |
constant | Indicates that a field is using the private access permission type. | ||
FieldPermissionTypeInterface:: |
constant | Indicates that a field does not have field-specific access control. | ||
FieldPermissionTypeInterface:: |
public | function | The permission type description. | 1 |
FieldPermissionTypeInterface:: |
public | function | The permission type label. | 1 |
FieldPermissionTypeInterface:: |
public | function | Determine if access to the field is granted for a given account. | 3 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |