<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Skeleton extends MY_Controller {

    /**
     * video preview poup content.
     */
    public function video_preview($video_id) {
        $em = $this->doctrine->em;
        $this->local_data = [
            'video_id' => $video_id
        ];
        echo json_encode([
            'content' => $this->load->view('skeleton/video_preview', $this->getData(), true)
        ]);
    }
    
        public function image_preview($image_id) {
        $em = $this->doctrine->em;
            $data = [
            'image' => $em->getRepository('Entities\Resource')->findOneBy(['id' => $image_id])
        ];
        echo json_encode([
            'content' => $this->load->view('skeleton/image_preview', $data, true)
        ]);
    }
}

/* End of file skeleton.php */
/* Location: ./src/site/controllers/skeleton.php */
