* @author Shohei Nakajima * @link http://www.netcommons.org NetCommons Project * @license http://www.netcommons.org/license.txt NetCommons License * @copyright Copyright 2014, NetCommons Project */ App::uses('FormHelper', 'View/Helper'); /** * Button Helper * * @package NetCommons\NetCommons\View\Helper */ class ButtonHelper extends FormHelper { /** * Other helpers used by FormHelper * * @var array */ public $helpers = array( 'Form', 'Html', 'NetCommons.BackTo', 'NetCommons.LinkButton', 'NetCommons.NetCommonsForm', 'NetCommons.NetCommonsHtml', ); /** * LinkButtonHelperラップ用マジックメソッド。 * * @param string $method メソッド * @param array $params パラメータ * @return mixed */ public function __call($method, $params) { if (in_array($method, ['addLink', 'editLink', 'searchLink', 'sortLink'], true)) { $method = substr($method, 0, -4); return call_user_func_array(array($this->LinkButton, $method), $params); } } /** * ボタンサイズ取得 * * @return string A HTML button tag. */ public function getButtonSize() { if (Configure::read('isMobile')) { $btnSize = ' btn-sm'; } else { $btnSize = ''; } return $btnSize; } /** *