Download the PHP package label305/auja without Composer
On this page you can find all versions of the php package label305/auja. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download label305/auja
More information about label305/auja
Files in label305/auja
Package auja
Short Description A web service development kit for communicating with the Auja javascript frontend. Auja is an easy-to-use, easy-to-implement admin interface for managing your data.
License Apache-2.0
Homepage http://label305.github.io/Auja
Informations about the package auja
Auja PHP Development Kit
Deprecated
This repo will no longer be maintained and will be deleted in the start of 2017.
About
Auja is an easy-to-use, easy-to-implement admin interface. It provides an easy and intuitive way for you to view and manipulate your data, so you can focus on more important matters. Auja is designed to be both user-friendly and developer-friendly by providing you with tools to setup your admin interface in a couple of minutes.
The Auja javascript frontend provides the graphical user interface. To determine its content, it relies on a JSON web-service you implement. This repository in turn, provides an Object Oriented approach to provide these JSON messages from a PHP application.
Related repositories
- Auja - The frontend JavaScript GUI
- Auja for Laravel - An implementation of Auja for the Laravel framework
Setup
Auja-PHP is available on Packagist. Add Auja-PHP to your dependencies by running
composer require label305/auja:v3.0.0-alpha5
Usage
Auja uses three main types:
- Main
- Menu
- Page
Each of these classes have implemented the __toString()
method which returns valid JSON, accepted by the Auja JavaScript implementation.
Main
The Label305\Auja\Main\Main
class is used to define the main view of Auja. The following example will tell Auja to create a logout button, and add a single model item. It also adds an authentication form:
Menu
The Label305\Auja\Menu\Menu
class is used to define the menus in Auja. The following example creates a menu for the Club
model:
As you can see, three MenuItem
types are used:
LinkMenuItem
- represents a simple link to another menu or page;SpacerMenuItem
- represents a simple text label;ResourceMenuItem
- represents a collection of resources.
The ResourceMenuItem
is a placeholder for the actual items to show. When its target url is called, Auja expects a Label305\Auja\Menu\Resource
object, containing a list of entries:
Page
A page, defined by Label305\Auja\Page\Page
, represents a panel to view and modify a single entry. The following example creates an edit page for the Club
model:
Developing
To start developing for Auja-PHP, do the following:
- Clone the project;
- Run
composer install
.
To run PhpSpec, execute bin/phpspec run
.
If you want to run code coverage locally, you need to execute the following:
composer require henrikbjorn/phpspec-code-coverage:~0.2 satooshi/php-coveralls:~0.6
printf "\nextensions:\n - PhpSpec\\\\Extension\CodeCoverageExtension" >> phpspec.yml
Do not commit these changes!
License
Copyright 2014 Label305 B.V.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.