Structures_DataGrid::setDefaultSort

Structures_DataGrid::setDefaultSort() – デフォルトの並べ替え条件を設定する

Synopsis

require_once 'Structures/DataGrid.php';

mixed Structures_DataGrid::setDefaultSort ( array $sortSpec )

Description

並べ替え条件が HTTP リクエストで指定されておらず、かつ sortRecordSet() メソッドもコールされていない場合、setDefaultSort() に渡した設定が用いられます。

これは、ユーザが最初にデータグリッドを見るときに すでに並べ替え済みであってほしい場合に有用です。

このメソッドは、bind() より先にコールする必要があります。

Parameter

array $sortSpec

array(fieldName => direction, ...) で表した、並べ替えの設定。

Return value

true あるいは PEAR_Error オブジェクトを返します。

Throws

例外はスローされません。

Note

This function can not be called statically.