PHPackages                             label305/auja - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. label305/auja

AbandonedArchivedLibrary[Admin Panels](/categories/admin)

label305/auja
=============

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.

v3.0.0-alpha19(10y ago)73.4k1[3 issues](https://github.com/Label305/Auja-PHP/issues)1Apache-2.0PHPPHP &gt;=5.4.0

Since Oct 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Label305/Auja-PHP)[ Packagist](https://packagist.org/packages/label305/auja)[ Docs](http://label305.github.io/Auja)[ RSS](/packages/label305-auja/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (10)Dependencies (3)Versions (22)Used By (1)

Auja PHP Development Kit
========================

[](#auja-php-development-kit)

**Deprecated**

This repo will no longer be maintained and will be deleted in the start of 2017.

**About**

[![Build Status](https://camo.githubusercontent.com/b7f9feca7f12583774887f1b82efdb09c1703eff73ca9f29fd901a81bdd09cea/68747470733a2f2f7472617669732d63692e6f72672f4c6162656c3330352f41756a612d5048502e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Label305/Auja-PHP)[![Coverage Status](https://camo.githubusercontent.com/ceb5c7b731bab5214d32a4f0a68915fec8d4e52de789008ea8bdbffcd2f772a3/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f4c6162656c3330352f41756a612d5048502f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/Label305/Auja-PHP?branch=master)[![Dependency Status](https://camo.githubusercontent.com/ae2e5eb15cacd9ec4de620bd8fa5e6ca09a512c54a9bf861db6116a7aa4b3c2a/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3534383939313733373436656235313933303030303265622f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/54899173746eb519300002eb)[![Latest Stable Version](https://camo.githubusercontent.com/c094c1757acc552d58e3ad29c1cd1b026deacfa2ecd6a28f8f227ad8b60bd670/68747470733a2f2f706f7365722e707567782e6f72672f6c6162656c3330352f61756a612f762f737461626c652e737667)](https://packagist.org/packages/label305/auja)[![Total Downloads](https://camo.githubusercontent.com/9a249b19a73891266516a8d6815450f277c9c3066838552fa52ed26903b77bbe/68747470733a2f2f706f7365722e707567782e6f72672f6c6162656c3330352f61756a612f646f776e6c6f6164732e737667)](https://packagist.org/packages/label305/auja)[![Latest Unstable Version](https://camo.githubusercontent.com/ac863a7d82c7fc564b5bd34ae2e3a26175278d0d5001495947545e999a49b276/68747470733a2f2f706f7365722e707567782e6f72672f6c6162656c3330352f61756a612f762f756e737461626c652e737667)](https://packagist.org/packages/label305/auja)

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](https://github.com/Label305/Auja) 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
--------------------

[](#related-repositories)

- [**Auja**](https://github.com/Label305/Auja) - The frontend JavaScript GUI
- [**Auja for Laravel**](https://github.com/Label305/Auja-Laravel) - An implementation of Auja for the Laravel framework

Setup
-----

[](#setup)

Auja-PHP is available on [Packagist](https://packagist.org/packages/label305/auja). Add Auja-PHP to your dependencies by running

```
composer require label305/auja:v3.0.0-alpha5

```

Usage
-----

[](#usage)

Auja uses three main types:

- [Main](#main)
- [Menu](#menu)
- [Page](#page)

Each of these classes have implemented the `__toString()` method which returns valid JSON, accepted by the Auja JavaScript implementation.

### Main

[](#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:

```
$main = new Main();

$main->setTitle('My Application');
$main->setColor(Main::COLOR_MAIN, '#22bcb9');

/* Add a logout button. */
$logoutButton = new Button();
$logoutButton
  ->setTitle($logoutButton)
  ->setTarget('#logout');
$main->addButton($logoutButton);

/* Add a model. */
$item = new Item();
$item
    ->setTitle('Club')
    ->setIcon('tower')
    ->setTarget('/clubs/menu');
$menu->addMenuItem($item);

/* Add an authentication form. */
$authenticationForm = new Form();
$authenticationForm
    ->setAction('#login')
    ->setMethod('POST');

    /* Add a username text field. */
    $usernameTextFormItem = new TextFormItem();
    $usernameTextFormItem
        ->setName('username')
        ->setLabel('Username');
    $authenticationForm->addFormItem($usernameTextFormItem);

    /* Add a password field. */
    $passwordFormItem = new PasswordFormItem();
    $passwordFormItem
        ->setName('password')
        ->setLabel('Password');
    $result->addFormItem($passwordFormItem);

    /* Add a submit button. */
    $submitFormItem = new SubmitFormItem();
    $submitFormItem->setText('Login');
    $result->addFormItem($submitFormItem);

$main->setAuthenticationForm($authenticationForm);

return $main;
```

### Menu

[](#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:

```
$menu = new Menu();

/* Add a link item to add a club. */
$addMenuItem = new LinkMenuItem();
$addMenuItem
    ->setName('Add')
    ->setTarget('/clubs/create');
$menu->addMenuItem($addMenuItem);

/* Add a spacer. */
$spacerMenuItem = new SpacerMenuItem();
$spacerMenuItem->setName('Clubs');
$menu->addMenuItem($spacerMenuItem);

/* Add a placeholder for showing a list of clubs. */
$resourceMenuItem = new ResourceMenuItem();
$resourceMenuItem->setTarget('/clubs');
$menu->addMenuItem($resourceMenuItem);

return $menu;
```

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:

```
$resource = new Resource();

/* Add Manchester United to the list. */
$item = new LinkMenuItem();
$item
    ->setName('Manchester United')
    ->setTarget('/clubs/1');
$resource->addItem($item);

/* Add FC Bayern Munchen to the list. */
$item = new LinkMenuItem();
$item
    ->setName('FC Bayern München')
    ->setTarget('/clubs/2');
$resource->addItem($item);

/* Provide a url to the next page of clubs. */
$resource->setNextPageUrl('/clubs?page=2');

return $resource;
```

### Page

[](#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:

```
/* Retrieve the Club instance. */
$club = ...;

$page = new Page();

/* Add a header with a delete button. */
$pageHeader = new PageHeader();
$pageHeader->setText('Edit Club');

$deleteButton = new Button();
$deleteButton
    ->setText('Delete')
    ->setConfirmationMessage('Are you sure?')
    ->setTarget('/clubs/1')
    ->setMethod('DELETE');
$pageHeader->addButton($deleteButton);

$page->addPageComponent($pageHeader);

/* Add the form. */
$form = new Form();
$form
    ->setAction('/clubs/1')
    ->setMethod('PUT');

    /* Add a name text field.  */
    $nameFormItem = new TextFormItem();
    $nameFormItem
        ->setName('name')
        ->setLabel('Name')
        ->setValue($club->getName());
    $form->addFormItem($nameFormItem);

    /* Add a submit button. */
    $submitFormItem = new SubmitFormItem();
    $submitFormItem->setText('Submit');
    $form->addFormItem($submitFormItem);

$form->addPageComponent($form);

return $page;
```

Developing
----------

[](#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
-------

[](#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

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.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance11

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~56 days

Total

19

Last Release

3829d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/44893?v=4)[Thijs](/maintainers/tscheepers)[@tscheepers](https://github.com/tscheepers)

![](https://avatars.githubusercontent.com/u/411527?v=4)[Label305](/maintainers/Label305)[@Label305](https://github.com/Label305)

![](https://www.gravatar.com/avatar/ab97645e715a5816707321d79e2ceadd772652c6198bf634458c4019c8e7ebbd?d=identicon)[nhaarman](/maintainers/nhaarman)

---

Top Contributors

[![tscheepers](https://avatars.githubusercontent.com/u/44893?v=4)](https://github.com/tscheepers "tscheepers (18 commits)")[![xanderpeuscher](https://avatars.githubusercontent.com/u/1401193?v=4)](https://github.com/xanderpeuscher "xanderpeuscher (11 commits)")[![nhaarman](https://avatars.githubusercontent.com/u/3015152?v=4)](https://github.com/nhaarman "nhaarman (5 commits)")[![JBlaak](https://avatars.githubusercontent.com/u/410113?v=4)](https://github.com/JBlaak "JBlaak (4 commits)")

---

Tags

phpadminAuja

### Embed Badge

![Health badge](/badges/label305-auja/health.svg)

```
[![Health](https://phpackages.com/badges/label305-auja/health.svg)](https://phpackages.com/packages/label305-auja)
```

###  Alternatives

[redchamps/module-clean-admin-menu

It will merge all third party extensions menu items to single menu item named 'Extensions'.

164416.3k](/packages/redchamps-module-clean-admin-menu)[rockys/ex-admin-thinkphp

Ex-admin-thinkphp 是一个基于Ant Design of Vue + Thinkphp 开发而成后台系统构建工具，无需关注页面模板JavaScript，只用php代码即可快速构建出一个功能完善的后台系统。

163.0k](/packages/rockys-ex-admin-thinkphp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
