PHPackages                             gourmet/common - 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. gourmet/common

ActiveCakephp-plugin

gourmet/common
==============

Gourmet Common Plugin for rapid CakePHP application development.

0.3.2(11y ago)125412MITPHPPHP &gt;=5.3.0

Since Jan 25Pushed 11y ago1 watchersCompare

[ Source](https://github.com/gourmet/common)[ Packagist](https://packagist.org/packages/gourmet/common)[ Docs](https://github.com/gourmet/common)[ RSS](/packages/gourmet-common/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (15)Used By (2)

CakePHP Common Plugin
=====================

[](#cakephp-common-plugin)

Built to help quickly putting together [CakePHP](http://cakephp.org) applications.

Apart from being the base to all other [gourmet plugins](http://github.com/gourmet), this plugin extends some of the [CakePHP](http://cakephp.org) core functionality (i.e. full support of logging scopes, more complete base test case, better app configuration, etc.).

Features
--------

[](#features)

- Easily [extendable using events](/gourmet/common/wiki/Events).
- Simplified test writing.
- Advanced application configuration.
- Out of the box support for [other popular CakePHP plugins](/gourmet/common/wiki/Other-Popular-Plugins).

### Behaviors

[](#behaviors)

- [Authorizable](/gourmet/common/wiki/Authorizable-Behavior): Controls access to records.
- [Commentable](/gourmet/common/wiki/Commentable-Behavior): Adds comments to records.
- [Computable](/gourmet/common/wiki/Computable-Behavior): Computes total or average similarly to the [CakePHP](http://cakephp.org)'s `counterCache`.
- [Confirmable](/gourmet/common/wiki/Confirmable-Behavior): Adds `isConfirmed()` validation rule.
- [Detailable](/gourmet/common/wiki/Detailable-Behavior): Extends any record with extra details.
- [Duplicatable](/gourmet/common/wiki/Duplicatable-Behavior): Duplicates any record to another model's table.
- [Encodable](/gourmet/common/wiki/Encodable-Behavior): Encodes array values in records for storing.
- [Filterable](/gourmet/common/wiki/Filterable-Behavior): Filters out any field from both, the `find()` resultset and `save()` result.
- [Stateable](/gourmet/common/wiki/Stateable-Behavior): Adds `status` type of field to records.

### Components

[](#components)

- [Opauth](/gourmet/common/wiki/Opauth-Component): Adds the missing component from the [CakePHP Opauth](/uzyn/cakephp-opauth) plugin.
- [PersistentValidation](/gourmet/common/wiki/PersistentValidation-Component): Persists validation errors after a redirect.

### Helpers

[](#helpers)

- [Asset](/gourmet/common/wiki/Asset-Helper): Controls asset inclusions (works well with [AssetCompress](/markstory/asset_compress)).
- [Navigation](/gourmet/common/wiki/Navigation-Helper): Renders navigations.
- [Stateable](/gourmet/common/wiki/Stateable-Helper): Adds `status` type of selection list.
- [Table](/gourmet/common/wiki/Table-Helper): Creates table for displaying result sets, with pagination support.

Install
-------

[](#install)

### Composer package

[](#composer-package)

First, add this plugin as a requirement to your `composer.json`:

```
{
	"require": {
		"cakephp/common": "*"
	}
}

```

And then update:

```
php composer.phar update

```

That's it! You should now be ready to start configuring your channels.

### Submodule

[](#submodule)

```
$ cd /app
$ git submodule add git://github.com/gourmet/common.git Plugin/Common

```

### Clone

[](#clone)

```
$ cd /app/Plugin
$ git clone git://github.com/gourmet/common.git

```

Configuration
-------------

[](#configuration)

You need to enable the plugin your `app/Config/bootstrap.php` file:

```
CakePlugin::load('Common', array('bootstrap' => true, 'routes' => true));

```

If you are already using `CakePlugin::loadAll();`, then this is not necessary.

Replace `app/Console/Command/AppShell.php` with the following:

```
