Esempio n. 1
0
 /**
  * 以指定的格式输出角色列表
  * 
  * @param integer|null $roleId 父角色ID
  * @param array $attributes 需要显示的HTML标签的属性
  * @param string $style 输出的HTML类型,为空则返回PHP数组
  * @param integer|null $count 总共取出多少数据
  * @param integer $offset 从哪一行开始取数据
  * @return string|array
  */
 public function roleList($roleId, $attributes = array(), $style = 'select', $count = null, $offset = 0)
 {
     $role = new ZtChart_Model_Role($roleId);
     $rowset = $role->getSelfAndChildRoles($count, $offset);
     if (empty($style)) {
         return $rowset->toArray();
     }
     return $this->_html($rowset, $style, $attributes);
 }