Exemple #1
0
 /**
  * @param int $offset
  * @param $maxRecords
  * @return array
  */
 function list_perspectives($offset = 0, $maxRecords = -1)
 {
     $db = TikiDb::get();
     $list = $db->fetchAll("SELECT perspectiveId, name FROM tiki_perspectives", array(), $maxRecords, $offset);
     $list = Perms::simpleFilter('perspective', 'perspectiveId', 'perspective_view', $list);
     foreach ($list as &$info) {
         $perms = Perms::get(array('type' => 'perspective', 'object' => $info['perspectiveId']));
         $this->write_permissions($info, $perms);
     }
     return $list;
 }
Exemple #2
0
 function getTemplateList()
 {
     $list = $this->templates()->fetchAll(array('templateId', 'name'), array());
     $list = Perms::simpleFilter('workspace', 'templateId', 'workspace_instantiate', $list);
     return $list;
 }