original_string: public function putToNodeAccess(AccountInterface $account, RouteMatch $route_match) {
      // We'd have 404'd already if node didn't exist, so no need to check.
      // Just hack it out of the route match.
      $node = $route_match->getParameter('node');
      return AccessResult::allowedIf($node->access('update', $account) && $account->hasPermission('create media'));
    }
code: public function putToNodeAccess(AccountInterface $account, RouteMatch $route_match) {
      // We'd have 404'd already if node didn't exist, so no need to check.
      // Just hack it out of the route match.
      $node = $route_match->getParameter('node');
      return AccessResult::allowedIf($node->access('update', $account) && $account->hasPermission('create media'));
    }
code_tokens: public function putToNodeAccess ( AccountInterface $ account , RouteMatch $ route_match ) { // We'd have 404'd already if node didn't exist, so no need to check. // Just hack it out of the route match. $ node = $ route_match -> getParameter ( 'node' ) ; return AccessResult :: allowedIf ( $ node -> access ( 'update' , $ account ) && $ account -> hasPermission ( 'create media' ) ) ; }
docstring: Checks for permissions to update a node and create media.
  
  @param \Drupal\Core\Session\AccountInterface $account
  Account for user making the request.
  @param \Drupal\Core\Routing\RouteMatch $route_match
  Route match to get Node from url params.
  
  @return \Drupal\Core\Access\AccessResultInterface
  Access result.
docstring_tokens: Checks for permissions to update a node and create media .