eZ\Publish\Core\FieldType\BinaryFile\Type::fromPersistenceValue PHP Метод

fromPersistenceValue() публичный Метод

This method builds a field type value from the $data and $externalData properties.
public fromPersistenceValue ( eZ\Publish\SPI\Persistence\Content\FieldValue $fieldValue ) : Value
$fieldValue eZ\Publish\SPI\Persistence\Content\FieldValue
Результат Value
    public function fromPersistenceValue(FieldValue $fieldValue)
    {
        if ($fieldValue->externalData === null) {
            return $this->getEmptyValue();
        }
        $result = parent::fromPersistenceValue($fieldValue);
        $result->downloadCount = isset($fieldValue->externalData['downloadCount']) ? $fieldValue->externalData['downloadCount'] : 0;
        return $result;
    }