Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- App::uses('Controller', 'Controller');
- class AppController extends Controller {
- public function beforeFilter() {
- parent::beforeFilter();
- Controller::loadModel('Histories');
- $histories = $this->Histories->__getAll();
- $root = array();
- foreach ($histories as $key => $value) {
- $child = array();
- foreach ($value["ChildPage"] as $cKey => $cVal) {
- array_push($child, array(
- "company" => $cVal["company"]
- , "industry" => $cVal["industry"]
- , "period_from" => $cVal["period_from"]
- , "period_to" => $cVal["period_to"]
- , "occupation" => $cVal["occupation"]
- , "concentration" => $cVal["concentration"]
- , "jobDescription" => $cVal["jobDescription"]
- ));
- }
- array_push($root, array("Types" => $value["Histories"]["types"], "Values" => $child));
- }
- $this->set('resumes', $root);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement