public function deleteBlockAction()
	{
		$this->isPostRequest();
		$this->checkLock();

		$blockId = $this->getRequestParameter('block_id');

		$entityManager = $this->getEntityManager();

		$block = $entityManager->find(Block::CN(), $blockId);

		if ($block === null) {
			throw new CmsException(null, sprintf('Block with ID [%s] not found.', $blockId));
		}

		$entityManager->remove($block);

		$entityManager->flush();
		
		return new SupraJsonResponse();
	}
public function deleteBlockAction()
	{
		$this->isPostRequest();
		$this->checkLock();

		$blockId = $this->getRequestParameter('block_id');

		$entityManager = $this->getEntityManager();

		$block = $entityManager->find(Block::CN(), $blockId);

		if ($block === null) {
			throw new CmsException(null, sprintf('Block with ID [%s] not found.', $blockId));
		}

		$entityManager->remove($block);

		$entityManager->flush();
		
		return new SupraJsonResponse();
	}
public function deleteBlockAction ( ) { $ this -> isPostRequest ( ) ; $ this -> checkLock ( ) ; $ blockId = $ this -> getRequestParameter ( 'block_id' ) ; $ entityManager = $ this -> getEntityManager ( ) ; $ block = $ entityManager -> find ( Block :: CN ( ) , $ blockId ) ; if ( $ block === null ) { throw new CmsException ( null , sprintf ( 'Block with ID [%s] not found.' , $ blockId ) ) ; } $ entityManager -> remove ( $ block ) ; $ entityManager -> flush ( ) ; return new SupraJsonResponse ( ) ; }
Handles block deletion request.
Handles block deletion request .