Security/PermisoVoter.php
protected function supports($attribute, $subject)
    {
        // if the attribute isn't one we support, return false
        if (!in_array($attribute, array(self::MENU, self::PERMISO))) {
            return false;
        }

        if ($attribute == self::MENU && !is_null($subject) && !$subject instanceof Menu) {
            return false;
        }

        return true;
    }
protected function supports($attribute, $subject)
    {
        // if the attribute isn't one we support, return false
        if (!in_array($attribute, array(self::MENU, self::PERMISO))) {
            return false;
        }

        if ($attribute == self::MENU && !is_null($subject) && !$subject instanceof Menu) {
            return false;
        }

        return true;
    }
Determines if the attribute and subject are supported by this voter.

@param string $attribute An attribute
@param mixed $subject The subject to secure, e.g. an object the user wants to access or any other PHP type

@return bool True if the attribute and subject are supported, false otherwise