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

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

        return $types;
    }