[php] g

Viewer

  1.         public function ModulChildData($settings,$reportmodel,$requestdata,$moduldataxml,$model,$field,$value){
  2.  
  3.                                    $this->_controller->loadModel($model);
  4.                    $returnarray =  $this->_controller->$model->find('first',array('conditions'=>array($model.'.id' => $value)));
  5.                    $returnarray = $returnarray [$model];
  6.                    if (isset($moduldataxml->childs)) {
  7.                        foreach ($moduldataxml->childs->value as $childkey => $childvalue) {
  8.                          $childvalue = trim($childvalue);
  9.                          $childvaluefield = Inflector::camelize($childvalue);
  10.                           $response[$reportmodel][$childvaluefield]['value'] = $returnarray [trim($childvalue)];
  11.  
  12.                           if(isset($settings->$reportmodel->$childvalue->radiooption)){
  13.                             $response[$reportmodel][$childvaluefield]['value'] = trim($settings->$reportmodel->$childvalue->radiooption->value[$returnarray [trim($childvalue)]]);
  14.                           }
  15.                        }
  16.  
  17.                    }
  18.                 return $response;
  19.                 }

Editor

You can edit this paste and save as new:


File Description
  • g
  • Paste Code
  • 27 Jan-2021
  • 1.13 Kb
You can Share it: