You are here

public function BeanCustom::save in Bean (for Drupal 7) 7

Save the record to the database

File

bean_admin_ui/plugins/BeanCustom.class.php, line 30
Bean ctools plugin

Class

BeanCustom
DO NOT USE THIS BEAN. ONLY USED FOR THE UI PLUGINS

Code

public function save($new = FALSE) {
  $bean_type = array(
    'name' => check_plain($this->type),
    'label' => check_plain($this
      ->getLabel()),
    'description' => check_plain($this
      ->getDescription()),
  );
  $primary_key = $new == FALSE ? 'name' : array();
  drupal_write_record('bean_type', $bean_type, $primary_key);
  bean_reset();
}