HTML_QuickForm_hierselect::setSecOptions()

HTML_QuickForm_hierselect::setSecOptions() – 非推奨: 2 番目の select のオプションを設定する

Synopsis

require_once 'HTML/QuickForm/hierselect.php';

void HTML_QuickForm_hierselect::setSecOptions ( array $options )

Description

2 番目の select のオプションを設定します。オプションは 2 次元の配列で渡し、 最初のキーが親の ID、2 番目のキーが子の ID となります。 2 番目のオプションの内容を設定するには、親のオプションの内容が必要となります。

このメソッドは非推奨です。かわりに setOptions() を使用してください。

Parameter

array $options

2 番目の select のオプションの配列。

Throws

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

See

setMainOptions() も参照ください。

Note

This function can not be called statically.

This function is deprecated. That means that future versions of this package may not support it anymore.

リリース 3.2.2 で廃止予定です。

Example

hierselect のオプションの設定

<?php
$hierSel 
=& $form->addElement('hierselect''test''Test:'null'/');

$main[0] = 'Pop';
$main[1] = 'Classical';
$main[2] = 'Funeral doom';

$sec[0][1] = 'Red Hot Chili Peppers';
$sec[0][2] = 'The Pixies';
$sec[1][3] = 'Wagner';
$sec[1][4] = 'Strauss';
$sec[2][5] = 'Pantheist';
$sec[2][6] = 'Skepticism';

$hierSel->setMainOptions($main);
$hierSel->setSecOptions($sec);
?>