Download the PHP package codekanzlei/cake-frontend-bridge without Composer

On this page you can find all versions of the php package codekanzlei/cake-frontend-bridge. 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 cake-frontend-bridge

CakePHP 3 Notifications Plugin

A CakePHP 3 plugin that allows the creation of JavaScript Controllers for Controller-actions. Code-generation via the shell is possible as well.

Dependencies

Installation

1. require the plugin in composer.json

2. Include the plugin using composer

Open a terminal in your project-folder and run

$ composer update

3. Load the plugin in config/bootstrap.php

4. Create additional files

Create the following files and set them up using the given code.

5. Configure AppController.php

In your src/Controller/AppController.php, insert the following pieces of code to setup the Frontend Bridge plugin.

Traits:

$helpers:

$components:

6. Load the scripts

Inside your section add the following code to load all needed .js controllers:

In development add into the if block to load without exceptions all .js controllers

7. Add Main Content Classes

Inside your Layout\default.ctp add the following line. Inside the div should be your content.

Also add this to other layout files, if you're using them.

Bake JS Controllers

You can bake JS Controllers for your controller actions by using the bake shell. Just pass the controller name and the camelized action name.

This command will create the JavaScript-controller file and if necessary the directory structure for it.

You can also bake JS controllers into your plugins by using the --plugin option.

Code Examples

Use the following example code snippets to get a better understanding of the FrontendBridge Plugin and its useful features. Note that you might need to include further Plugins for these.

1.) Access view variables in js_controller

Use the following basic setup to pass data from the Backend to the Frontend via FrontendBridge.

Be sure to play close attention to the naming convention, especially regarding the action_controller.js. Following the example shown above, its exact path should be /webroot/js/app/controllers/your/action_controller.js

The data you passed from the Controller to the Frontend in the variable varName should now be rendered in the view.

2.) Use modal dialog windows for editing forms

This example uses the following additional Plugins:

Use the following basic setup to use a modal view element as an edit form that passes the change-request data to the Backend via FrontendBridge. For this example, we will use a basic Users-Model as well as a modal form-element, embedded in the regular view page for a User-Entity to edit and save some of its attributes.

3.) Generate custom AJAX requests

Use the following setup to generate custom AJAX requests. Using FrontendBridge's 'request' action, we will pass JSON data from the Backend to the Frontend.

4.) Load content dynamically using AJAX

Use the following setup to make custom HTML requests via AJAX. Using FrontendBridge's loadJsonAction and request, we will implement a very basic livesearch.

This example assumes a Table called Users with a field username in your database.

Functionality Overview


All versions of cake-frontend-bridge with dependencies

PHP Build Version
Package Version
Requires php Version ~7.1
cakephp/cakephp Version ~3.6
cakephp/plugin-installer Version *
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 codekanzlei/cake-frontend-bridge contains the following files

Loading the files please wait ....