public static function RestfulEntityAndPropertyAccessTestCase::publicFieldAccessFalse in RESTful 7
An access callback that returns TRUE if title is "access". Otherwise FALSE.
Parameters
string $op: The operation that access should be checked for. Can be "view" or "edit". Defaults to "edit".
string $public_field_name: The name of the public field.
EntityMetadataWrapper $property_wrapper: The wrapped property.
EntityMetadataWrapper $wrapper: The wrapped entity.
Return value
string "Allow" or "Deny" if user has access to the property.
File
- tests/
RestfulEntityAndPropertyAccessTestCase.test, line 234 - Contains RestfulEntityAndPropertyAccessTestCase
Class
- RestfulEntityAndPropertyAccessTestCase
- @file Contains RestfulEntityAndPropertyAccessTestCase
Code
public static function publicFieldAccessFalse($op, $public_field_name, \EntityMetadataWrapper $property_wrapper, \EntityMetadataWrapper $wrapper) {
return $wrapper
->label() == 'access' ? \RestfulInterface::ACCESS_ALLOW : \RestfulInterface::ACCESS_DENY;
}