common.inc Drupal :
if (!empty($info['entity keys']['bundle'])) {
if (!isset($entity->{$info['entity keys']['bundle']}) || $entity->{$info['entity keys']['bundle']} === '') {
throw new EntityMalformedException(t('Missing bundle property on entity of type @entity_type.', array('@entity_type' => $entity_type)));
}
$bundle = $entity->{$info['entity keys']['bundle']};
}
, , bundle , , () .
, , .
( drush, PHP- /devel/php, Devel ).
, bundle entity keys , , :
drush eval 'print_r(entity_get_info("student"));'
type, , , , type.
entity_load() , , , .
, , , :
drush eval '$entity = entity_load("student", array(1)); entity_get_controller("student")->save(reset($entity))'
- entity_type, 1 - .
- , (entity_info_cache_clear()) common.inc (, var_dump($entity); $entity , , type.
: EntityMalformedException? DO