eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::extractTypeFromRow PHP Method

extractTypeFromRow() protected method

Creates a Type from the data in $row.
protected extractTypeFromRow ( array $row ) : eZ\Publish\SPI\Persistence\Content\Type
$row array
return eZ\Publish\SPI\Persistence\Content\Type
    protected function extractTypeFromRow(array $row)
    {
        $type = new Type();
        $type->id = (int) $row['ezcontentclass_id'];
        $type->status = (int) $row['ezcontentclass_version'];
        $type->name = unserialize($row['ezcontentclass_serialized_name_list']);
        $type->description = unserialize($row['ezcontentclass_serialized_description_list']);
        // Unset redundant data
        unset($type->name['always-available'], $type->name[0], $type->description['always-available'], $type->description[0]);
        $type->identifier = $row['ezcontentclass_identifier'];
        $type->created = (int) $row['ezcontentclass_created'];
        $type->modified = (int) $row['ezcontentclass_modified'];
        $type->modifierId = (int) $row['ezcontentclass_modifier_id'];
        $type->creatorId = (int) $row['ezcontentclass_creator_id'];
        $type->remoteId = $row['ezcontentclass_remote_id'];
        $type->urlAliasSchema = $row['ezcontentclass_url_alias_name'];
        $type->nameSchema = $row['ezcontentclass_contentobject_name'];
        $type->isContainer = $row['ezcontentclass_is_container'] == 1;
        $type->initialLanguageId = (int) $row['ezcontentclass_initial_language_id'];
        $type->defaultAlwaysAvailable = $row['ezcontentclass_always_available'] == 1;
        $type->sortField = (int) $row['ezcontentclass_sort_field'];
        $type->sortOrder = (int) $row['ezcontentclass_sort_order'];
        $type->groupIds = array();
        $type->fieldDefinitions = array();
        return $type;
    }