コード例 #1
0
ファイル: databasejoin.php プロジェクト: ppantilla/bbninja
 /**
  * Called when the element is saved
  *
  * @param   array  $data  posted element save data
  *
  * @return  bool  save ok or not
  */
 public function onSave($data)
 {
     $params = json_decode($data['params']);
     if (!$this->canEncrypt() && !empty($params->encrypt)) {
         throw new RuntimeException('The encryption option is only available for field and text area plugins');
         return false;
     }
     if (!$this->isJoin()) {
         $this->updateFabrikJoins($data, $this->getDbName(), $this->getJoinValueFieldName(), $this->getLabelParamVal());
     }
     return parent::onSave($data);
 }