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

		$this->isPostRequest();

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

		if ($folder->hasChildren()) {
			throw new CmsException(null, 'Cannot remove non-empty folder.');
		}

		$this->getEntityManager()->remove($folder);
		$this->getEntityManager()->flush();

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

		$this->isPostRequest();

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

		if ($folder->hasChildren()) {
			throw new CmsException(null, 'Cannot remove non-empty folder.');
		}

		$this->getEntityManager()->remove($folder);
		$this->getEntityManager()->flush();

		return new SupraJsonResponse();
	}
public function deleteAction ( ) { $ this -> checkLock ( ) ; $ this -> isPostRequest ( ) ; $ folder = $ this -> getPageLocalization ( ) -> getMaster ( ) ; if ( $ folder -> hasChildren ( ) ) { throw new CmsException ( null , 'Cannot remove non-empty folder.' ) ; } $ this -> getEntityManager ( ) -> remove ( $ folder ) ; $ this -> getEntityManager ( ) -> flush ( ) ; return new SupraJsonResponse ( ) ; }
Folder delete action.

@return SupraJsonResponse
Folder delete action .