Issue #3075404 by eiriksm: Wrong return type in several access_check service docblocks
parent
7f66616b76
commit
4907fa7f72
|
|
@ -48,8 +48,8 @@ class NodeAddAccessCheck implements AccessInterface {
|
|||
* (optional) The node type. If not specified, access is allowed if there
|
||||
* exists at least one node type for which the user may create a node.
|
||||
*
|
||||
* @return string
|
||||
* A \Drupal\Core\Access\AccessInterface constant value.
|
||||
* @return \Drupal\Core\Access\AccessResultInterface
|
||||
* The access result.
|
||||
*/
|
||||
public function access(AccountInterface $account, NodeTypeInterface $node_type = NULL) {
|
||||
$access_control_handler = $this->entityTypeManager->getAccessControlHandler('node');
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ class NodePreviewAccessCheck implements AccessInterface {
|
|||
* @param \Drupal\node\NodeInterface $node_preview
|
||||
* The node that is being previewed.
|
||||
*
|
||||
* @return string
|
||||
* A \Drupal\Core\Access\AccessInterface constant value.
|
||||
* @return \Drupal\Core\Access\AccessResultInterface
|
||||
* The access result.
|
||||
*/
|
||||
public function access(AccountInterface $account, NodeInterface $node_preview) {
|
||||
if ($node_preview->isNew()) {
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ class DbUpdateAccessCheck implements AccessInterface {
|
|||
* @param \Drupal\Core\Session\AccountInterface $account
|
||||
* The currently logged in account.
|
||||
*
|
||||
* @return string
|
||||
* A \Drupal\Core\Access\AccessInterface constant value.
|
||||
* @return \Drupal\Core\Access\AccessResultInterface
|
||||
* The access result.
|
||||
*/
|
||||
public function access(AccountInterface $account) {
|
||||
// Allow the global variable in settings.php to override the access check.
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ class TestAccessCheck implements AccessInterface {
|
|||
/**
|
||||
* Checks access.
|
||||
*
|
||||
* @return string
|
||||
* A \Drupal\Core\Access\AccessInterface constant value.
|
||||
* @return \Drupal\Core\Access\AccessResultInterface
|
||||
* The access result.
|
||||
*/
|
||||
public function access() {
|
||||
// No opinion, so other access checks should decide if access should be
|
||||
|
|
|
|||
Loading…
Reference in New Issue