cakephp3で下記のようなコードをTableクラスに記述してあります。
php
1public function beforeFind(Event $event , $entity , $options) { 2 dump($entity->params); 3}
しかし、これはundefined errorになってしまいます。
dump($entity);とすると、paramsというプロパティは確かにあるのですが、どのようにすれば、$entity->paramsの値にアクセスできますでしょうか。
ちなみに、entityクラスには、
php
1protected $_accessible = [ 2 'params' => true, 3 'user_id' => true, 4 'title' => true, 5 'description' => true, 6 'url' => true, 7 'user' => true, 8 'tags' => true, 9 'tag_string' => true, 10 ];
のような記述がしてあります。
あなたの回答
tips
プレビュー