You are here

public function Box::loadUp in Boxes 7.2

This is a work around for version of PDO that call __construct() before it loads up the object with values from the DB.

1 call to Box::loadUp()
Box::setUp in includes/boxes.core.inc
Set up the object instance on construction or unserializiation.

File

includes/boxes.core.inc, line 189
Box classes and plugin interface

Class

Box
The Box entity class

Code

public function loadUp($plugin) {
  if (empty($this->plugin)) {

    // If the plugin has been disabled, the $plugin will be a boolean.
    // just load the base plugin so something will render.
    if (!$plugin instanceof BoxTypePluginInterface) {
      $plugin = boxes_load_plugin_class('box_default');
    }
    $this
      ->setPlugin($plugin);
    $this
      ->setFields();
  }
}