/** * Allow some override values * @return parent::beforeSave(); */ public function beforeSave() { if (($allow_api = Cii::get(Cii::getCiiConfig(), 'allow_api', true)) == false) { $this->attributes['enableAPI'] = $this->enableAPI = (int) $allow_api; } // Encrypt the Openstack API Key if ($this->attributes['openstack_apikey'] != NULL && $this->attributes['openstack_apikey'] != "") { $this->attributes['openstack_apikey'] = $this->openstack_apikey = Cii::encrypt($this->attributes['openstack_apikey']); } return parent::beforeSave(); }