60 $this->factory = GeneralUtility::makeInstance(ResourceFactory::class);
68 public function add($object)
77 public function remove($object)
87 public function replace($existingObject, $newObject)
96 public function update($modifiedObject)
130 $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($this->table);
132 $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
136 ->from($this->table);
138 if (!empty($this->type)) {
139 $queryBuilder->where(
140 $queryBuilder->expr()->eq(
142 $queryBuilder->createNamedParameter($this->type, \PDO::PARAM_STR)
146 $result = $queryBuilder->execute();
149 while ($row = $result->fetch()) {
193 throw new \InvalidArgumentException(
'The UID has to be an integer. UID given: "' . $uid .
'"', 1316779798);
195 $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($this->table);
197 $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
203 $queryBuilder->expr()->eq(
'uid', $queryBuilder->createNamedParameter($uid, \PDO::PARAM_INT))
207 if (!is_array($row)) {
208 throw new \RuntimeException(
'Could not find row with UID "' . $uid .
'" in table "' . $this->table .
'"', 1314354065);
227 throw new \BadMethodCallException(
'Repository does not support the setDefaultOrderings() method.', 1313185906);
239 throw new \BadMethodCallException(
'Repository does not support the setDefaultQuerySettings() method.', 1313185907);
250 throw new \BadMethodCallException(
'Repository does not support the createQuery() method.', 1313185908);
273 public function __call($method, $arguments)
275 throw new \BadMethodCallException(
'Repository method "' . $method .
'" is not implemented.', 1378918410);