Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to a member function getImages() on null #50

Open
bogdan-baerov opened this issue Sep 7, 2017 · 2 comments
Open

Call to a member function getImages() on null #50

bogdan-baerov opened this issue Sep 7, 2017 · 2 comments

Comments

@bogdan-baerov
Copy link

image
Hello, after lots of time at last I can upload and see the images at least, but when I try to use:
foreach($model->getBehavior('galleryBehavior')->getImages() as $image) {
echo Html::img($image->getUrl('medium'));
}
I get that error, no idea what to do, please help

@zxbodya
Copy link
Owner

zxbodya commented Sep 7, 2017

$model in code about should be active record where you attached gallery behaviour, but not GalleryImage.

@bogdan-baerov
Copy link
Author

Oh, I understand, I have a Product model with that behaviour, so I'll just change that, thank you very much, oh and another tip, please...make the documentation more explicit, it's really a lil pain in the ass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants