You are here

function bean_save in Bean (for Drupal 7) 7

Inserts or updates a bean object into the database.

Parameters

$bean: The bean object to be inserted.

Return value

Failure to write a record will return FALSE. Otherwise SAVED_NEW or SAVED_UPDATED is returned depending on the operation performed.

4 calls to bean_save()
BeanInlineEntityFormController::save in includes/bean.inline_entity_form.inc
Overrides EntityInlineEntityFormController::save().
BeanTests::testBeanAPI in tests/BeanTests.test
Test the bean API.
BeanTests::testRendering in tests/BeanTests.test
Tests viewing beans.
PanelizerEntityBean::entity_save in plugins/entity/PanelizerEntityBean.class.php
Implement the save function for the entity.

File

./bean.module, line 802
Block Entity

Code

function bean_save(Bean $bean) {
  return $bean
    ->save();
}