public function Bean::loadUp in Bean (for Drupal 7) 7
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 Bean::loadUp()
- Bean::setUp in includes/
bean.core.inc - Set up the object instance on construction or unserializiation.
File
- includes/
bean.core.inc, line 205 - Bean classes and plugin interface
Class
- Bean
- The Bean 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 BeanTypePluginInterface) {
$plugin = bean_load_plugin_class('bean_default');
}
$this
->setPlugin($plugin)
->setFields();
}
return $this;
}