eZ\Publish\Core\FieldType\Media\Type::toHash PHP Méthode

toHash() public méthode

Converts a $Value to a hash.
public toHash ( eZ\Publish\SPI\fieldType\Value $value ) : mixed
$value eZ\Publish\SPI\fieldType\Value
Résultat mixed
    public function toHash(SPIValue $value)
    {
        if ($this->isEmptyValue($value)) {
            return null;
        }
        $hash = parent::toHash($value);
        $hash['hasController'] = $value->hasController;
        $hash['autoplay'] = $value->autoplay;
        $hash['loop'] = $value->loop;
        $hash['width'] = $value->width;
        $hash['height'] = $value->height;
        return $hash;
    }