public function deleteAction()
	{
		$this->checkLock();

		$this->isPostRequest();

		$page = $this->getPageLocalization()
			->getMaster();

		if ($page->hasChildren()) {
			throw new CmsException(null, "Cannot remove page with children");
		}

		$entityManager = $this->getEntityManager();
		$entityManager->remove($page);
		$entityManager->flush();

		return new SupraJsonResponse();
	}
public function deleteAction()
	{
		$this->checkLock();

		$this->isPostRequest();

		$page = $this->getPageLocalization()
			->getMaster();

		if ($page->hasChildren()) {
			throw new CmsException(null, "Cannot remove page with children");
		}

		$entityManager = $this->getEntityManager();
		$entityManager->remove($page);
		$entityManager->flush();

		return new SupraJsonResponse();
	}
public function deleteAction ( ) { $ this -> checkLock ( ) ; $ this -> isPostRequest ( ) ; $ page = $ this -> getPageLocalization ( ) -> getMaster ( ) ; if ( $ page -> hasChildren ( ) ) { throw new CmsException ( null , "Cannot remove page with children" ) ; } $ entityManager = $ this -> getEntityManager ( ) ; $ entityManager -> remove ( $ page ) ; $ entityManager -> flush ( ) ; return new SupraJsonResponse ( ) ; }
Page delete action.

@return SupraJsonResponse
Page delete action .