lib/Persistence/Doctrine/QueryHandler/LayoutQueryHandler.php
public function createLayout(Layout $layout): Layout
    {
        $query = $this->connection->createQueryBuilder()
            ->insert('ngbm_layout')
            ->values(
                [
                    'id' => ':id',
                    'status' => ':status',
                    'type' => ':type',
                    'name' => ':name',
                    'description' => ':description',
                    'created' => ':created',
                    'modified' => ':modified',
                    'shared' => ':shared',
                    'main_locale' => ':main_locale',
                ]
            )
            ->setValue(
                'id',
                $layout->id !== null ?
                    (int) $layout->id :
                    $this->connectionHelper->getAutoIncrementValue('ngbm_layout')
            )
            ->setParameter('status', $layout->status, Type::INTEGER)
            ->setParameter('type', $layout->type, Type::STRING)
            ->setParameter('name', $layout->name, Type::STRING)
            ->setParameter('description', $layout->description, Type::STRING)
            ->setParameter('created', $layout->created, Type::INTEGER)
            ->setParameter('modified', $layout->modified, Type::INTEGER)
            ->setParameter('shared', $layout->shared, Type::BOOLEAN)
            ->setParameter('main_locale', $layout->mainLocale, Type::STRING);

        $query->execute();

        $layout->id = $layout->id ?? (int) $this->connectionHelper->lastInsertId('ngbm_layout');

        return $layout;
    }
public function createLayout(Layout $layout): Layout
    {
        $query = $this->connection->createQueryBuilder()
            ->insert('ngbm_layout')
            ->values(
                [
                    'id' => ':id',
                    'status' => ':status',
                    'type' => ':type',
                    'name' => ':name',
                    'description' => ':description',
                    'created' => ':created',
                    'modified' => ':modified',
                    'shared' => ':shared',
                    'main_locale' => ':main_locale',
                ]
            )
            ->setValue(
                'id',
                $layout->id !== null ?
                    (int) $layout->id :
                    $this->connectionHelper->getAutoIncrementValue('ngbm_layout')
            )
            ->setParameter('status', $layout->status, Type::INTEGER)
            ->setParameter('type', $layout->type, Type::STRING)
            ->setParameter('name', $layout->name, Type::STRING)
            ->setParameter('description', $layout->description, Type::STRING)
            ->setParameter('created', $layout->created, Type::INTEGER)
            ->setParameter('modified', $layout->modified, Type::INTEGER)
            ->setParameter('shared', $layout->shared, Type::BOOLEAN)
            ->setParameter('main_locale', $layout->mainLocale, Type::STRING);

        $query->execute();

        $layout->id = $layout->id ?? (int) $this->connectionHelper->lastInsertId('ngbm_layout');

        return $layout;
    }
public function createLayout ( Layout $ layout ) : Layout { $ query = $ this -> connection -> createQueryBuilder ( ) -> insert ( 'ngbm_layout' ) -> values ( [ 'id' => ':id' , 'status' => ':status' , 'type' => ':type' , 'name' => ':name' , 'description' => ':description' , 'created' => ':created' , 'modified' => ':modified' , 'shared' => ':shared' , 'main_locale' => ':main_locale' , ] ) -> setValue ( 'id' , $ layout -> id !== null ? ( int ) $ layout -> id : $ this -> connectionHelper -> getAutoIncrementValue ( 'ngbm_layout' ) ) -> setParameter ( 'status' , $ layout -> status , Type :: INTEGER ) -> setParameter ( 'type' , $ layout -> type , Type :: STRING ) -> setParameter ( 'name' , $ layout -> name , Type :: STRING ) -> setParameter ( 'description' , $ layout -> description , Type :: STRING ) -> setParameter ( 'created' , $ layout -> created , Type :: INTEGER ) -> setParameter ( 'modified' , $ layout -> modified , Type :: INTEGER ) -> setParameter ( 'shared' , $ layout -> shared , Type :: BOOLEAN ) -> setParameter ( 'main_locale' , $ layout -> mainLocale , Type :: STRING ) ; $ query -> execute ( ) ; $ layout -> id = $ layout -> id ?? ( int ) $ this -> connectionHelper -> lastInsertId ( 'ngbm_layout' ) ; return $ layout ; }
Creates a layout.
Creates a layout .