* @author Shohei Nakajima
* [Files.FilesFormHelper::uploadFile()](../../Files/classes/FilesFormHelper.html#method_uploadFile)
* の結果を出力する。
*
* -
* NetCommonsForm::checkbox()
* [NetCommons.FormInputHelper::checkbox()](./FormInputHelper.html#method_checkbox)
* の結果を出力する。
*
* -
* NetCommonsForm::radio()
* [NetCommons.FormInputHelper::radio()](./FormInputHelper.html#method_radio)
* の結果を出力する。
*
* -
* NetCommonsForm::wysiwyg()
* [Wysiwyg.WysiwygHelper::wysiwyg()](../../Wysiwyg/classes/WysiwygHelper.html#method_wysiwyg)
* の結果を出力する。
*
* -
* NetCommonsForm::inlineCheckbox()
* $paramsに以下を追加して、
* [NetCommons.FormInputHelper::checkbox()](./FormInputHelper.html#method_checkbox)
* の結果を出力する。ただし、すでに$paramsにあれば、無視する。
* ```
* $params[1] = array(
* 'class' => false,
* 'div' => array('class' => 'form-group')
* )
* ```
*
* -
* NetCommonsForm::inputWithTitleIcon()
* [NetCommons.TitleIconHelper::inputWithTitleIcon()](./TitleIconHelper.html#method_inputWithTitleIcon)
* の結果を出力する。
*
* -
* NetCommonsForm::titleIconPicker()
* [NetCommons.TitleIconHelper::titleIconPicker()](./TitleIconHelper.html#method_titleIconPicker)
* の結果を出力する。
*
* -
* NetCommonsForm::ngTitleIconPicker()
* [NetCommons.TitleIconHelper::ngTitleIconPicker()](./TitleIconHelper.html#method_ngTitleIconPicker)
* の結果を出力する。
*
* -
* NetCommonsForm::ngTitleIconPicker()
* [NetCommons.DisplayNumber::select()](./DisplayNumberHelper.html#method_select)
* の結果を出力する。
*
* -
* それ以外
* [FormHelper](http://book.cakephp.org/2.0/ja/core-libraries/helpers/form.html#formhelper)
* の各メソッドの結果を出力する。
*
* @param string $method メソッド
* @param array $params パラメータ
* @return mixed
*/
public function __call($method, $params) {
if ($method === 'uploadFile') {
//アップロード
$helper = $this->FilesForm;
} elseif (in_array($method, ['hidden', 'checkbox', 'radio', 'select', 'email'], true)) {
$helper = $this->FormInput;
} elseif ($method === 'wysiwyg') {
//WYSIWYG
$helper = $this->_View->loadHelper('Wysiwyg.Wysiwyg');
} elseif ($method === 'inlineCheckbox') {
//checkbox、radioのインライン
$helper = $this->FormInput;
$method = 'checkbox';
$params = Hash::insert($params, '1.class', false);
$params = Hash::insert($params, '1.div', array('class' => 'form-group'));
} elseif (in_array($method,
['inputWithTitleIcon', 'titleIconPicker', 'ngTitleIconPicker'], true)) {
//タイトルアイコン
$this->NetCommonsHtml->script('/net_commons/js/title_icon_picker.js');
$helper = $this->_View->loadHelper('NetCommons.TitleIcon');
} elseif ($method === 'selectNumber') {
//表示件数
$helper = $this->_View->loadHelper('NetCommons.DisplayNumber');
$method = 'select';
} elseif ($method === 'selectDays') {
//表示件数
$helper = $this->_View->loadHelper('NetCommons.DisplayNumber');
$method = 'selectDays';
} elseif ($method === 'button') {
//ボタン
$helper = $this->_View->loadHelper('NetCommons.Button');
} else {
//それ以外
$helper = $this->Form;
}
return call_user_func_array(array($helper, $method), $params);
}
/**
* 共通のオプションをセットして、FormHelper->create()の結果を出力する
*
* - 二重submit防止のため、ng-submit=submit($event)をセットする
* - エラー出力をNetCommons用の表示をするため、novalidateをOffにする
*
* #### return サンプル
* ```
*