Download the PHP package burdaforward/bf-prg-bundle without Composer

On this page you can find all versions of the php package burdaforward/bf-prg-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bf-prg-bundle

BFPrgBundle

The BFPrgBundle adds support for masking urls based on PRG-Pattern.

For more information about this pattern please take a closer look to the following url: Post/Redirect/Get

Note: This bundle is built for use in a symfony application.

Installation & Setup

  1. Run or download teh bundle to you local vendor directory
  2. Activate this bundle

    • It should be activated automatically if you have Symfony Flex installed
    • Manually via or
  3. Add the bundle to your routing configuration like

    This routing.yml enables a required route .

  4. In the last step you need to include the basic template of that bundle into your templates.

    (Best position is before closing body tag.)

Usage & Examples

The bundle provides a twig function you can call in your templates.

Function name: prg_link
Function parameter:
    url: Destination URL including GET parameter
    title: Label  of the masked link. e.g. <a href="#">TITLE</a>
    options: This is an array the supports the following options.
        class: you can set the css class of the rendered element
        element: the default is "span" but if you want to render a "button", "div" or "a" you can set it with this option
        target: you can define if the link should open in the same window (default value) or in a new one 
                valid values are
                    - _self (same frame)
                    - _top (same window
                    - _blank (new window)
        only_open_tag: has to be set true or false - the result will only return the opening tag of a prg link 
                       ATTENTION: You have to close the tag by yourself.

Basic example:

{{ prg_link('http://example.org?q=sample', 'Click me')|raw }}

Result: <span class="prg-link" data-submit="aHR0cDovL2V4YW1wbGUub3JnP3E9c2FtcGxl"  data-target="_self">Click me</span>

Stylesheet example:

{{ prg_link('http://example.org?q=sample', 'Click me', {class: 'my-link'})|raw }}

Result: <span class="prg-link my-link" data-submit="aHR0cDovL2V4YW1wbGUub3JnP3E9c2FtcGxl"  data-target="_self">Click me</span>

Target example

{{ prg_link('http://example.org?q=sample', 'Click me', {target: '_blank'})|raw }}

Result: <span class="prg-link" data-submit="aHR0cDovL2V4YW1wbGUub3JnP3E9c2FtcGxl" data-target="_blank">Click me</span>

Element example:

{{ prg_link('http://example.org?q=sample', 'Click me', {element: 'button'})|raw }}

Result: <button class="prg-link" data-submit="aHR0cDovL2V4YW1wbGUub3JnP3E9c2FtcGxl" data-target="_self">Click me</button>

Only Open Tag example:

{{ prg_link('http://example.org?q=sample', 'Title will be ignored', {only_open_tag: true)|raw }}

Result: <span class="prg-link" data-submit="aHR0cDovL2V4YW1wbGUub3JnP3E9c2FtcGxl" data-target="_self">

Contact

For questions and improvements contact us.


All versions of bf-prg-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
symfony/framework-bundle Version ^5.4 || ^6.4
twig/twig Version ^2.15 || ^3.0
symfony/yaml Version ^5.4 || ^6.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package burdaforward/bf-prg-bundle contains the following files

Loading the files please wait ....