PHP code example of sideclick / bootstrap-modal-bundle
1. Go to this page and download the library: Download sideclick/bootstrap-modal-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sideclick / bootstrap-modal-bundle example snippets
php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Sideclick\BootstrapModalBundle\SideclickBootstrapModalBundle(),
);
}
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
class DefaultController extends Controller
{
// implement the BootstrapModalBundle Controller Trait which will
// bring three methods: redirectWithAjaxSupport(), reloadWithAjaxSupport() & redirectToRouteWithAjaxSupport()
use \Sideclick\BootstrapModalBundle\Controller\ControllerTrait;
public function thisActionWillRedirect(Request $request)
{
return $this->redirectWithAjaxSupport($request, '/new/url')
}
public function thisActionWillReload(Request $request)
{
return $this->reloadWithAjaxSupport($request)
}
public function thisActionWillReload(Request $request)
{
return $this->redirectToRouteWithAjaxSupport($request,'route_name',['parameters'=>$parameters])
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.