2013-07-12 29 views
0

我试图在plesk服务器上开发新的扩展(版本11)。我试图创建几列简单的列表。在这些例子中,我发现下面的代码通过Plesk创建它(Zend公司)mechanizm:plesk禁用特定列的排序

private function _getListRandom() 
{ 
    $data = array(); 
    $iconPath = pm_Context::getBaseUrl() . 'images/icon_16.gif'; 
    for ($i = 0; $i < 150; $i++) { 
     $data[] = array(
      'column-1' => '<a href="#">' . (string)rand() . '</a>', 
      'column-2' => '<img src="' . $iconPath . '" /> ' . (string)rand(), 
     ); 
    } 

    $list = new pm_View_List_Simple($this->view, $this->_request); 
    $list->setData($data); 
    $list->setColumns(array(
     'column-1' => array(
      'title' => 'Random with link', 
      'noEscape' => true, 
     ), 
     'column-2' => array(
      'title' => 'Random with image', 
      'noEscape' => true, 
     ), 
    )); 
    // Take into account listDataAction corresponds to the URL /list-data/ 
    $list->setDataUrl(array('action' => 'list-data')); 

    return $list; 
} 

public function listAction() 
{ 
    $list = $this->_getListRandom(); 

    // List object for pm_View_Helper_RenderList 
    $this->view->list = $list; 
} 

后者而我完全陷入在一个问题:如何禁用分拣特定列?我正在通过互联网寻找一些解决方案,但我还没有找到任何解决方案。预先感谢您的帮助。

回答

0

不幸的是,排序参数是在pm_View_List_Simple类中硬编码的。

+0

感谢您的重播 – Piotr