<?php

namespace Webkul\DamBundle\Provider;

use Webkul\DamBundle\AttributeType\DamAssetAttributeTypes;
use Webkul\DamBundle\Listener\ClassDefinationForCompatibility;

$versionCompatiblility = new ClassDefinationForCompatibility();
$versionCompatiblility->createClassAliases();

class DamAttributeProvider implements \FieldProviderInterface
{

    /**
     * {@inheritdoc}
     */
    public function getField($element)
    {
        return DamAssetAttributeTypes::DAM_ASSETS;
    }

    /**
     * {@inheritdoc}
     */
    public function supports($element)
    {
        return $element instanceof \AttributeInterface
            && DamAssetAttributeTypes::DAM_ASSETS === $element->getType();
    }
}
