Download the PHP package braunstetter/control-panel-bundle without Composer

On this page you can find all versions of the php package braunstetter/control-panel-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 control-panel-bundle

ControlPanelBundle

Build Status Total Downloads License

Sometimes you don't want to commit to a complete admin system. But you would like to have a nice admin panel structure ready to be extended.

Installation

What's inside

Templates

You can extend these templates, but you can also use the braunstetter/template-hooks-bundle whose hooks are used inside of the base.html.twig file.

FormTypes

This bundle comes with several custom form types. To show you how you can use it, I want to show you an example.

To make this work you need an OrangePuppy Entity with a title and a description property on it.

Example - Up and running a fully working controlpanel

Create a new symfony project.

Setup the database

For this simple test just use a sqlite database by changing the .env file to:

`

Create a Controller with a route

Edit the twig template

Change templates/site/index.html.twig:

Note: don't forget to change the block name from body to content

Start the webserver and visit your control panel

Now you can see the result by visiting the /site url.

PageType Example

And here comes the explanation.

  1. Extend Braunstetter\ControlPanel\Form\PageType; (for additional build-methods)
  2. Set the title as an option (Either by submitting the option when creating the form, or by setting it inside the configureOptions method)
  3. Overwrite public function getParent() to get view variables and the theme block_prefix inheritance (basically make the styling working ;)
  4. Use the public buildBodyForm, buildSidebarForm, buildToplineRightForm, buildToplineLeftForm methods to fill the form.

The result:

The cp-button-default is a custom button class this bundle provides.

The nice menu on the left side is provided by the braunstetter/menu-bundle.

BoxType

Maybe you ask yourself where the nice sidebar box is coming from. And probably you recognized the TestBoxType inside the buildSidebarForm method. This is the second custom FormType this bundle provides. Here is an example:

This time you just have to overwrite the getParent() and return the Braunstetter\ControlPanel\Form\BoxType. (Because this FormType has no special methods.)

The BoxType has the symfony inherit_data option active by default. This way you can just use it just like you put the forms inside the parent class themselves.


All versions of control-panel-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
braunstetter/template-hooks-bundle Version ^0.2
braunstetter/assets-push-bundle Version ^0.2
symfony/twig-bundle Version ^5.3|^6.0
symfony/asset Version ^5.3|^6.0
symfony/form Version ^5.3|^6.0
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 braunstetter/control-panel-bundle contains the following files

Loading the files please wait ....