You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -72,7 +77,7 @@ public function vote(TokenInterface $token, $object, array $attributes)
72
77
}
73
78
74
79
foreach ($attributesas$attribute) {
75
-
if (!$this->supportsAttribute($attribute)) {
80
+
if (!$this->supports($attribute, $class)) {
76
81
continue;
77
82
}
78
83
@@ -95,19 +100,77 @@ public function vote(TokenInterface $token, $object, array $attributes)
95
100
return$vote;
96
101
}
97
102
103
+
/**
104
+
* Determines if the attribute and class are supported by this voter.
105
+
*
106
+
* To determine if the passed class is instance of the supported class, the
107
+
* isClassInstanceOf() method can be used.
108
+
*
109
+
* @param string $attribute An attribute
110
+
* @param string $class The fully qualified class name of the passed object
111
+
*
112
+
* @return bool True if the attribute and class is supported, false otherwise
113
+
*/
114
+
protectedfunctionsupports($attribute, $class)
115
+
{
116
+
@trigger_error('The getSupportedClasses and getSupportedAttributes methods are deprecated since version 2.8 and will be removed in version 3.0. Overwrite supports instead.');
0 commit comments