Ana içeriğe atla

Programatik olarak Node oluşturma

Taşkın Maksim
Taşkın Maksim
10 dakika okuma süresi
<?php

// Node deposu getir.
$nodeStorage = \Drupal::service('entity.manager')->getStorage('node');
// Set node content.
$content = [
    'type' => 'article',
    'title' => 'title',
    'body' => [
        'value' => 'Lorem ipsum dolor sit amet...',
        'format' => 'basic_html'
    ],
    'uid' => $uid
];
// Node oluşturma.
$node = $nodeStorage->create($content);
// Node-u kayıt et.
$node->save();

Ofislerimiz

Drupart Locations

Ofislerimiz

Drupart AR-GE

GOSB Teknopark Hi-Tech Bina 3.Kat B3 Gebze - KOCAELİ

+90 262 678 8872

+90 216 706 12 58 

[email protected]

Londra

151 West Green Road, London, England

+44 203 815 6478

[email protected]

Newark

112 Capitol Trail Suite, A437 Newark DE, 19711

+1 (740) 666 6255

[email protected]

Wiesbaden

Hinterbergstraße 27
65207 Wiesbaden
Deutschland

+49 (0) 6151 – 492 70 23

[email protected]