\LikeBehavior
Like Behavior
使用するプラグインのコンテンツモデルにLikeモデル、LikesUserモデルの
アソシエーションを設定します。
fieldオプションの指定がない場合は全データを取得しますが、
fieldオプションを個別に指定する場合は、Likeモデルのfieldも明示的に指定してください。
Sample code
ContentModel
class BbsArticle extends BbsesAppModel {
public $actsAs = array(
'Likes.Like'
)
}
ContentController
$bbsArticle = $this->BbsArticle->find('list');
ResultSample
$bbsArticle = array(
'BbsArticle' => array(...),
'Likes' => array(
'id' => '999',
'plugin_key' => 'abcdefg',
'block_key' => 'abcdefg',
'content_key' => 'abcdefg',
'like_count' => '9',
'unlike_count' => '9',
)
)
設定オプションはsetupメソッドを参照
Summary
No public properties found
No protected methods found
No protected properties found
No private properties found