diff --git a/View/Helper/UserSearchHelper.php b/View/Helper/UserSearchHelper.php index 4ef2d77..14068ac 100644 --- a/View/Helper/UserSearchHelper.php +++ b/View/Helper/UserSearchHelper.php @@ -53,7 +53,8 @@ public function __construct(View $View, $settings = array()) { $this->UsersLanguage = ClassRegistry::init('Users.UsersLanguage'); $this->userAttributes = Hash::combine( - $this->_View->viewVars['userAttributes'], '{n}.{n}.{n}.UserAttribute.key', '{n}.{n}.{n}' + Hash::get($this->_View->viewVars, 'userAttributes', array()), + '{n}.{n}.{n}.UserAttribute.key', '{n}.{n}.{n}' ); } @@ -61,10 +62,11 @@ public function __construct(View $View, $settings = array()) { * テーブルヘッダーの出力 * * @param bool $isEdit 編集の有無 + * @param bool $isSort ソートの有無 * @return string User value * @SuppressWarnings(PHPMD.BooleanArgumentFlag) */ - public function tableHeaders($isEdit = false) { + public function tableHeaders($isEdit = false, $isSort = true) { $output = ''; foreach ($this->_View->viewVars['displayFields'] as $fieldName) { @@ -81,15 +83,22 @@ public function tableHeaders($isEdit = false) { $output .= '