/** * Initialize the object * @param array */ public function __construct(\Database\Result $objResult = null) { parent::__construct($objResult); $this->arrData['allowed_cc_types'] = deserialize($this->arrData['allowed_cc_types']); if (is_array($this->arrData['allowed_cc_types'])) { $this->arrData['allowed_cc_types'] = array_intersect(static::getAllowedCCTypes(), $this->arrData['allowed_cc_types']); } }
/** * Initialize the object */ public function __construct(\Database\Result $objResult = null) { parent::__construct($objResult); // Do not use __destruct, because Database object might be destructed first (see http://github.com/contao/core/issues/2236) if (TL_MODE == 'FE') { register_shutdown_function(array($this, 'updateDatabase'), false); } }