/** * Finds a role matching the given identifier. * * @param mixed $identifier The identifier of the role to find * @return \TYPO3\Flow\Security\Policy\Role The matching role object if found, otherwise NULL */ public function findByIdentifier($identifier) { if (isset($this->newRoles[$identifier])) { return $this->newRoles[$identifier]; } return parent::findByIdentifier($identifier); }
/** * Removes an account * * @param object $object The account to remove * @return void * @throws \TYPO3\Flow\Persistence\Exception\IllegalObjectTypeException */ public function remove($object) { parent::remove($object); /** @var Account $object */ $tag = 'TYPO3-Flow-Security-Account-' . md5($object->getAccountIdentifier()); $this->sessionManager->destroySessionsByTag($tag, sprintf('The account %s (%s) was deleted', $object->getAccountIdentifier(), $object->getAuthenticationProviderName())); }
public function findAll() { $result = parent::findAll(); foreach ($result as $instance) { $instance->setContent($instance->getContent() . ' - touched by SubSubEntityRepository'); } return $result; }
/** * Removes a Resource object from this repository * * @param object $object * @return void */ public function remove($object) { // Intercept a second call for the same Resource object because it might cause an endless loop caused by // the ResourceManager's deleteResource() method which also calls this remove() function: if (!$this->removedResources->contains($object)) { $this->removedResources->attach($object); parent::remove($object); } }
/** * Removes an object from this repository. * First we must remove all references to this object. * * @param object $object The object to remove * @return void * @api */ public function remove($object) { if ($object instanceof \_OurBrand_\Quiz\Domain\Model\Quiz) { $copies = $this->findByCopyOf($object); /** @var \_OurBrand_\Quiz\Domain\Model\Quiz $copy */ foreach ($copies as $copy) { $copy->setCopyOf(null); $copy->setWasCopyOf($object->getTitle()); $this->update($copy); } $snapshots = $object->getSnapshots(); /** @var \_OurBrand_\Quiz\Domain\Model\Quiz $snapshot */ foreach ($snapshots as $snapshot) { // Todo: Check if snapshot is assigned. If assigned // throw exception. $snapshot->setSnapshotOf(null); $this->remove($snapshot); } } parent::remove($object); }
/** * @param string $identifier * @return Task */ public function findByIdentifier($identifier) { return parent::findByIdentifier($identifier); }
/** * @param string $accountId * @return \Ag\Login\Domain\Model\Account */ public function findByIdentifier($accountId) { return parent::findByIdentifier($accountId); }
/** * Removes an object to the persistence. * * This repository keeps track of added and removed nodes (additionally to the * other Unit of Work) in order to find in-memory nodes. * * @param object $object The object to remove * @return void * @api */ public function remove($object) { if ($object instanceof NodeInterface) { $object = $object->getNodeData(); } if ($this->addedNodes->contains($object)) { $this->addedNodes->detach($object); } if (!$this->removedNodes->contains($object)) { $this->removedNodes->attach($object); } parent::remove($object); }
/** * @param AssetInterface $object */ public function update($object) { parent::update($object); $this->assetService->emitAssetUpdated($object); }
/** * {@inheritdoc} */ public function __call($method, $arguments) { if ($this->enableDeleted) { $this->entityManager->getFilters()->disable('cdsrc.libraries.softdeletable.filter'); } $result = parent::__call($method, $arguments); $this->enableDeleted = false; $this->entityManager->getFilters()->enable('cdsrc.libraries.softdeletable.filter'); return $result; }
/** * @param \DLigo\Animaltool\Domain\Model\Action $action * @return void */ public function add($action) { $this->userRepository->update($action->getTeam()); parent::add($action); }
/** * Returns all items having the specified category * * @param \ThinkopenAt\TimeFlies\Domain\Model\Category $category * @return \TYPO3\Flow\Persistence\QueryResultInterface All items as requested by the report configuration */ public function findByCategory(Category $category = NULL) { $orderings = array('begin' => \TYPO3\Flow\Persistence\QueryInterface::ORDER_ASCENDING); $this->setDefaultOrderings($orderings); return parent::findByCategory($category); }
public function update($animal) { $this->processPhoto($animal); parent::update($animal); }