public function getValueByEntity($entity)
    {
        if (is_object($entity)) {
            $entity = get_class($entity);
        }

        /** @var ValueProviderInterface $provider */
        foreach ($this->getValues() as $provider) {
            if ($entity === $provider->getEntity()) {
                return $provider;
            }
        }

        return false;
    }
public function getValueByEntity($entity)
    {
        if (is_object($entity)) {
            $entity = get_class($entity);
        }

        /** @var ValueProviderInterface $provider */
        foreach ($this->getValues() as $provider) {
            if ($entity === $provider->getEntity()) {
                return $provider;
            }
        }

        return false;
    }
public function getValueByEntity ( $ entity ) { if ( is_object ( $ entity ) ) { $ entity = get_class ( $ entity ) ; } /** @var ValueProviderInterface $provider */ foreach ( $ this -> getValues ( ) as $ provider ) { if ( $ entity === $ provider -> getEntity ( ) ) { return $ provider ; } } return false ; }
Get a valueprovider by it's entity class

@param string|object $entity

@return ValueProviderInterface
Get a valueprovider by it s entity class