Kdyby\Doctrine\EntityManager::remove PHP Method

remove() public method

public remove ( object | array $entity ) : EntityManager
$entity object | array
return EntityManager
    public function remove($entity)
    {
        foreach (is_array($entity) ? $entity : func_get_args() as $item) {
            parent::remove($item);
        }
        return $this;
    }

Usage Example

示例#1
0
 /**
  * @param Page $page
  */
 private function removePageUrl(Page $page)
 {
     /** @var Url $url */
     $url = $this->urlFacade->getByPath($page->getUrlPath());
     if ($url !== null) {
         $this->cache->clean([Cache::TAGS => $url->getCacheKey()]);
         $this->em->remove($url);
     }
 }
All Usage Examples Of Kdyby\Doctrine\EntityManager::remove