public static function boxes_box::load

cis7 boxes_box.inc public static boxes_box::load($delta, $reset = FALSE)
cle7 boxes_box.inc public static boxes_box::load($delta, $reset = FALSE)
elmsmedia7 boxes_box.inc public static boxes_box::load($delta, $reset = FALSE)
icor7 boxes_box.inc public static boxes_box::load($delta, $reset = FALSE)
meedjum_blog7 boxes_box.inc public static boxes_box::load($delta, $reset = FALSE)
mooc7 boxes_box.inc public static boxes_box::load($delta, $reset = FALSE)

Load existing box by its unique identifier $delta.

1 call to boxes_box::load()
boxes_box_load in sites/all/modules/ulmus/boxes/boxes.module
Load a box.

File

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

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 static function load($delta, $reset = FALSE) {
  if (!isset(self::$boxes[$delta]) || $reset) {
    ctools_include('export');
    $box = ctools_export_load_object('box', 'names', array($delta));
    if (!empty($box) && $values = array_pop($box)) {
      self::$boxes[$delta] = self::factory($values->plugin_key, $values);
      self::$boxes[$delta]->new = FALSE;
    }
  }
  return isset(self::$boxes[$delta]) && get_class(self::$boxes[$delta]) != 'stdClass' ? self::$boxes[$delta] : NULL;
}