示例#1
0
文件: Stick.php 项目: ram600/vasabi
 public function showAction()
 {
     $id = $this->getEvent()->getRouteMatch()->getParam('id');
     $em = $this->getServiceLocator()->get('em');
     $bean = new \Sticks\Beans\Stickers($em);
     return array('stick' => $bean->getIfExist($id));
 }
示例#2
0
文件: Stick.php 项目: ram600/vasabi
 public function listAction()
 {
     $sb = new Stickers($this->getServiceLocator()->get('em'));
     $type = $this->getEvent()->getRouteMatch()->getParam('type', 'hot');
     //ajax
     if ($this->request->isPost()) {
         \Custom\Ajax\Json::response($sb->getList($type, true, array('s.id', 's.title', 'i.type', 'i.id as image_id', 's.rate')), 'ok');
     }
     return array('list' => $sb->getList($type));
 }