public function has($value)
    {
        if (!is_string($value) && !is_array($value)) {
            throw new \InvalidArgumentException('The ValueSet\'s "has" method requires the argument to be of type string or array');
        }

        if (is_string($value)) {
            return $this->__isset($value);
        } elseif (is_array($value)) {
            foreach ($value as $name) {
                if (!$this->__isset($value)) {
                    return false;
                }
            }

            return true;
        }
    }
public function has($value)
    {
        if (!is_string($value) && !is_array($value)) {
            throw new \InvalidArgumentException('The ValueSet\'s "has" method requires the argument to be of type string or array');
        }

        if (is_string($value)) {
            return $this->__isset($value);
        } elseif (is_array($value)) {
            foreach ($value as $name) {
                if (!$this->__isset($value)) {
                    return false;
                }
            }

            return true;
        }
    }
public function has ( $ value ) { if ( ! is_string ( $ value ) && ! is_array ( $ value ) ) { throw new \ InvalidArgumentException ( 'The ValueSet\'s "has" method requires the argument to be of type string or array' ) ; } if ( is_string ( $ value ) ) { return $ this -> __isset ( $ value ) ; } elseif ( is_array ( $ value ) ) { foreach ( $ value as $ name ) { if ( ! $ this -> __isset ( $ value ) ) { return false ; } } return true ; } }
Checks if a certain value exists on the valueset

Created for cleaner syntax in Twig:

{{ content.valueset.has('attributename') }}
or
{{ content.valueset.has(['attributename', 'anotherattributename']) }}

@param string|array $value

@return boolean
Checks if a certain value exists on the valueset