protected function voteOnAttribute($attribute, $subject, TokenInterface $token)
{
$user = $token->getUser();
if ($user instanceof User) {
return false;
}
if (!$this->limitObjects($attribute, $user)) {
throw new Exception('exception');
}
return true;
}
if (!is_null($orderBy))
{
if ('rand' == strtolower($orderBy))
{
$countArray = count($propertyArray);
for ($i=0; $i < $countArray; $i++)
{
$propArray[] = $propertyArray[array_rand($propertyArray)];
}
} else $propArray = $propertyArray;
} else $propArray = $propertyArray;
return $propArray;