2 namespace TYPO3\CMS\Core\Collection;
85 $this->storage = new \SplDoublyLinkedList();
97 return $this->storage->current();
109 $this->storage->next();
121 $currentRecord = $this->storage->current();
122 return $currentRecord[
'uid'];
134 return $this->storage->valid();
146 $this->storage->rewind();
175 return self::load($data[
'uid']);
187 return $this->storage->count();
239 $this->description = $desc;
260 $this->itemTableName = $tableName;
273 public function usort($callbackFunction)
276 throw new \RuntimeException(
'This method is not yet supported.', 1322545589);
289 public function moveItemAt($currentPosition, $newPosition = 0)
292 throw new \RuntimeException(
'This method is not yet supported.', 1322545626);
313 $this->uid = (int)$id;
327 public static function load($id, $fillItems =
false)
329 $collectionRecord =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetSingleRow(
331 static::$storageTableName,
334 return self::create($collectionRecord, $fillItems);
345 public static function create(array $collectionRecord, $fillItems =
false)
347 $collection =
new static();
348 $collection->fromArray($collectionRecord);
350 $collection->loadContents();
364 trim(static::$storageTableName) => array(
370 $data[trim(static::$storageTableName)][
$uid][
'pid'] = 0;
373 $tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
374 $tce->stripslashes_values = 0;
375 $tce->start($data, array());
376 $tce->process_datamap();
401 foreach ($this->storage as $entry) {
404 return implode(
',',
$list);
414 $itemArray = array();
415 foreach ($this->storage as $item) {
416 $itemArray[] = $item;
423 'items' => $itemArray
435 $this->uid = $array[
'uid'];
436 $this->title = $array[
'title'];
437 $this->description = $array[
'description'];
438 $this->itemTableName = $array[
'table_name'];