It would be very useful to document how to create ECK objects programmatically with v2.

Issue fork eck-3455733

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

This structure is a starting point.

use Drupal\eck\Entity\EckEntity;

$organization = EckEntity::create([
  'entity_type' => $eck_entity_type,
  'type' => $eck_entity_bundle,
]);
$organization->setOwner($account);
$organization->set('title', $the_title);
$organization->set('field_some_string', $something);
$organization->save();

dieterholvoet made their first commit to this issue’s fork.

  • dieterholvoet committed 24ca6e3d on 2.x
    Issue #3455733 by damienmckenna, dieterholvoet: Document how to create...
dieterholvoet’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

dieterholvoet’s picture

Status: Fixed » Closed (fixed)