Can't create new thumbnail type on Concrete5 v8.0.0

Permalink 1 user found helpful
I am trying to create new thumbnail type, like this:

use Concrete\Core\File\Image\Thumbnail\Type\Type;
$type = new Type();
$type->setName( 'thumbnails name' );
$type->setHandle( 'block_handle' );
$type->setWidth( 250 );
$type->save();

On Concrete5 v7.5 everything working fine, but on v8.0.0 there is an error:

Call to undefined method Concrete\Core\File\Image\Thumbnail\Type\Type::setName()


How can i create thumbnail type on v8 ?

vr5
 
chemmett replied on at Permalink Best Answer Reply
chemmett
Took me a while to find this:
https://documentation.concrete5.org/tutorials/package-developers-upg...
The change is documented but this page is still wrong:
https://documentation.concrete5.org/developers/designing-for-concret...

Just replace
Concrete\Core\File\Image\Thumbnail\Type\Type
with
Concrete\Core\Entity\File\Image\Thumbnail\Type\Type
vr5 replied on at Permalink Reply
vr5
Thanks)

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.