public function boxes_box::save

cis7 boxes_box.inc public boxes_box::save()
cle7 boxes_box.inc public boxes_box::save()
elmsmedia7 boxes_box.inc public boxes_box::save()
icor7 boxes_box.inc public boxes_box::save()
meedjum_blog7 boxes_box.inc public boxes_box::save()
mooc7 boxes_box.inc public boxes_box::save()

Save a box.

File

sites/all/modules/ulmus/boxes/plugins/boxes_box.inc, line 94

Class

boxes_box
Abstract base class defining a box. A boxes content plugin provides a form of options for configuring content and renders content for display.

Code

public function save() {
  if (empty($this->delta)) {
    throw new Exception(t('Cannot save box without a specified delta.'));
  }
  self::reset();
  $existing = boxes_box_load($this->delta);
  if ($existing && ($existing->export_type & EXPORT_IN_DATABASE)) {
    drupal_write_record('box', $this, array('delta'));
  }
  else {
    drupal_write_record('box', $this);
  }
  $this->new = FALSE;
  self::reset();
  module_exists('context') ? context_invalidate_cache() : NULL;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.