36 private $warning =
'You should never see this warning. If you do, you probably used PHP array functions like current() on the TYPO3\\CMS\\Extbase\\Persistence\\Generic\\LazyObjectStorage. To retrieve the first result, you can use the rewind() and current() methods.';
105 reset($this->storage);
114 if (!$this->dataMapper) {
115 $this->dataMapper = $this->objectManager->get(DataMapper::class);
126 $objects = $this->dataMapper->fetchRelated($this->parentObject, $this->propertyName, $this->fieldValue,
false);
127 foreach ($objects as $object) {
128 parent::attach($object);
132 $this->parentObject->_memorizeCleanState($this->propertyName);
142 return $this->parentObject->_getCleanProperty($this->propertyName) === $this;
163 public function attach($object, $data =
null)
166 parent::attach($object, $data);
178 return parent::contains($object);
189 $columnMap = $this->dataMapper->getDataMap(get_class($this->parentObject))->getColumnMap($this->propertyName);
190 $numberOfElements =
null;
192 $numberOfElements = $this->dataMapper->countRelated($this->parentObject, $this->propertyName, $this->fieldValue);
195 $numberOfElements =
count($this->storage);
197 if ($numberOfElements ===
null) {
198 throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception(
'The number of elements could not be determined.', 1252514486);
200 return $numberOfElements;
211 return parent::current();
219 public function detach($object)
222 parent::detach($object);
230 public function key()
233 return parent::key();
239 public function next()
254 return parent::offsetExists($value);
266 return parent::offsetGet($value);
278 parent::offsetSet($object, $info);
289 parent::offsetUnset($value);
320 return parent::valid();
331 return parent::toArray();
341 return parent::getPosition($object);