src/Form/Element/FileUpload.php
public function getAllowedTypes($asArray = false)
    {
        $types = $this->getAttribute('data-allowedtypes');

        if ($asArray) {
            return explode(',', $types);
        }

        return $types;
    }
public function getAllowedTypes($asArray = false)
    {
        $types = $this->getAttribute('data-allowedtypes');

        if ($asArray) {
            return explode(',', $types);
        }

        return $types;
    }
Gets the allowed mimetypes

@param bool $asArray if true, the types are returned as an array,
if false, the types are returned as comma separated string.

@return string|array