Ejemplo n.º 1
0
 /**
  * Event "Hook" function
  * can be overwritten
  * return false will stop any further action
  * @param ConnectionModel $self
  * @param $pkeys
  * @return bool
  */
 public function beforeInsertEvent($self, $pkeys)
 {
     // check for "default" connection type and add them if missing
     // -> get() with "true" returns RAW data! important for JSON table column check!
     $types = (array) json_decode($this->get('type', true));
     if (!$this->scope || empty($types)) {
         $this->setDefaultTypeData();
     }
     return parent::beforeInsertEvent($self, $pkeys);
 }