Get images as objects
Permalink Browser Info Environment
Hi,
Thanks for this great add-on. Is it possible somehow to get the fileobjects, so that I can manipulate them myself?
The reason for this is, that I would like to manipulate the files like I have done for the thumbnail page attribute as shown below (but when I get the attribute for the multiple files attribute, I get a string of the download urls instead of an object)
thanks, in advance
Thanks for this great add-on. Is it possible somehow to get the fileobjects, so that I can manipulate them myself?
The reason for this is, that I would like to manipulate the files like I have done for the thumbnail page attribute as shown below (but when I get the attribute for the multiple files attribute, I get a string of the download urls instead of an object)
thanks, in advance
Type: | Discussion |
---|---|
Status: | Resolved |
You need use Concrete\Package\PureMultipleFiles\Entity\Attribute\Value\Value::getFileObjects
$filesValue = $currentPage->getAttribute('handle');
if ($filesValue instanceof \Concrete\Core\Entity\Attribute\Value\Value\AbstractValue) {
$files = $filesValue->getFileObjects();
}
Is that what you were looking for?