You are here

function eck__entity_create in Entity Construction Kit (ECK) 7

This function creates an entity

Parameters

$entity_type_name: A string witht the type of entity to be created (node, user, etc)

$bundle_name: The bundle for the entity to be created (String)

1 call to eck__entity_create()
eck__entity__add in ./eck.entity.inc
Call back for the local action add (It adds a new entity)

File

./eck.module, line 138
ENTITY CONSTRUCTION KIT

Code

function eck__entity_create($entity_type_name, $bundle_name) {
  global $user;
  $values = array(
    'entity_type' => $entity_type_name,
    'type' => $bundle_name,
    'uid' => $user->uid,
    'created' => REQUEST_TIME,
    'changed' => REQUEST_TIME,
  );
  return entity_create($entity_type_name, $values);
}