eZ\Publish\Core\FieldType\Media\Type::checkValueStructure PHP Method

checkValueStructure() protected method

Throws an exception if value structure is not of expected format.
protected checkValueStructure ( Value $value )
$value eZ\Publish\Core\FieldType\Value
    protected function checkValueStructure(BaseValue $value)
    {
        parent::checkValueStructure($value);
        if (!is_bool($value->hasController)) {
            throw new InvalidArgumentType('$value->hasController', 'bool', $value->hasController);
        }
        if (!is_bool($value->autoplay)) {
            throw new InvalidArgumentType('$value->autoplay', 'bool', $value->autoplay);
        }
        if (!is_bool($value->loop)) {
            throw new InvalidArgumentType('$value->loop', 'bool', $value->loop);
        }
        if (!is_int($value->height)) {
            throw new InvalidArgumentType('$value->height', 'int', $value->height);
        }
        if (!is_int($value->width)) {
            throw new InvalidArgumentType('$value->width', 'int', $value->width);
        }
    }