The property mainImage does not seem to exist in TwoDotsTwice\Collection\AbstractCollection.
An attempt at access to an undefined property has been detected. This may either be a typographical error
or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods
to allow access. See the php core documentation on Overloading.
Loading history...
32
return $copy;
33
}
34
35
/**
36
* @return Image|null
37
*/
38
public function getMain()
39
{
40
if (0 === $this->length()) {
41
return null;
42
}
43
44
if ($this->mainImage) {
45
return $this->mainImage;
46
} else {
47
/** @var ArrayIterator $iterator */
48
$iterator = $this->getIterator();
49
$iterator->rewind();
50
51
return $iterator->current();
52
}
53
}
54
55
/**
56
* @param UUID $uuid
57
* @return Image|null
58
*/
59
public function findImageByUUID(UUID $uuid)
60
{
61
/** @var Image $image */
62
foreach ($this->items as $image) {
63
if ($image->getMediaObjectId()->sameValueAs($uuid)) {
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.