Exemplo n.º 1
0
Arquivo: pets.php Projeto: saqar/aowow
 protected function generateContent()
 {
     $conditions = [];
     if (!User::isInGroup(U_GROUP_EMPLOYEE)) {
         $conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
     }
     if ($this->category) {
         $conditions[] = ['type', (int) $this->category[0]];
     }
     $pets = new PetList($conditions);
     if (!$pets->error) {
         $this->extendGlobalData($pets->getJSGlobals(GLOBALINFO_RELATED));
         $params = ['visibleCols' => "\$['abilities']"];
         if (!$pets->hasDiffFields(['type'])) {
             $params['hiddenCols'] = "\$['type']";
         }
         $this->lvTabs[] = array('file' => 'pet', 'data' => $pets->getListviewData(), 'params' => $params);
     }
 }