/** * @see parent::store() */ function store() { $this->completeField("datetime_start"); if (!$this->datetime_start) { $this->datetime_start = CMbDT::dateTime(); } if (!$this->_id) { $rand = CMbSecurity::getRandomString(16); $this->hash = CMbSecurity::hash(CMbSecurity::SHA1, $rand); } return parent::store(); }