$helpers
$helpers : array
Other helpers used by FormHelper
Like Helper
イイネ!、ヤダネ!の画面表示機能を提供します。
setting(string $likeFieldName, string $unlikeFieldName, array $attributes = array()) : string
Output use like setting element
イイネ!、ヤダネ!使用設定HTMLを返します。
使用有無のフィールド名を指定してください。
(フィールド名は、use_like,use_unlike固定で良いのでは?)
<?php echo $this->Like->setting('BbsSetting.use_like', 'BbsSetting.use_unlike');
string | $likeFieldName | This should be "Modelname.fieldname" for use_like field |
string | $unlikeFieldName | This should be "Modelname.fieldname" for use_unlike field |
array | $attributes | Array of attributes and HTML arguments. |
HTML tags
display(array $setting, array $content, array $attributes = array()) : string
Output like and unlike display element
イイネ!、ヤダネ!表示HTMLを返します。(表示のみでクリックできません)
設定データ配列、コンテンツデータ配列を指定してください。
設定データ配列のuse_like,use_unlikeを判断し、コンテンツデータ配列のLike.unlike_countを表示します。
<?php echo $this->Like->display($bbsSetting, $bbsArticle); ?>
array | $setting | Array of use like setting data. |
array | $content | Array of content data with like count. |
array | $attributes | Array of attributes and HTML arguments. |
HTML tags
buttons(array $model, array $setting, array $content, array $attributes = array()) : string
Output like and unlike buttons element
イイネ!、ヤダネ!ボタンHTMLを返します。
コンテンツモデル名、設定データ配列、コンテンツデータ配列を指定してください。
設定データ配列のuse_like,use_unlikeを判断し、コンテンツデータ配列のLike.unlike_countを表示します。
コンテンツデータ配列のコンテンツモデル名.keyでカウントデータを更新します。
<?php echo $this->Like->buttons('BbsArticle', $bbsSetting, $bbsArticle); ?>
array | $model | String of model name |
array | $setting | Array of use like setting data. |
array | $content | Array of content data with like count. |
array | $attributes | Array of attributes and HTML arguments. |
HTML tags