Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfe4a1c6

Browse files
committed
voteevent
1 parent23a03e2 commitfe4a1c6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎src/Symfony/Bundle/SecurityBundle/EventListener/VoteListener.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ public function __construct(
3131

3232
publicfunctiononVoterVote(VoteEvent$event):void
3333
{
34-
$this->traceableAccessDecisionManager->addVoterVote($event->getVoter(),$event->getAttributes(),$event->getVote(true));
34+
$vote =null;
35+
$event->getVote($vote);
36+
$this->traceableAccessDecisionManager->addVoterVote($event->getVoter(),$event->getAttributes(),$vote);
3537
}
3638

3739
publicstaticfunctiongetSubscribedEvents():array

‎src/Symfony/Component/Security/Core/Event/VoteEvent.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,10 @@ public function getAttributes(): array
4747
return$this->attributes;
4848
}
4949

50-
publicfunctiongetVote($asObject =false):VoteInterface|int
50+
publicfunctiongetVote(VoteInterface &$vote =null):int
5151
{
52-
if ($this->voteinstanceof VoteInterface && !$asObject) {
53-
return$this->vote->getAccess();
54-
}
52+
$vote =$this->vote;
5553

56-
return$this->vote;
54+
return$this->voteinstanceof VoteInterface ?$this->vote->getAccess() :$this->vote;
5755
}
5856
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp