Download the PHP package carrooi/labels without Composer

On this page you can find all versions of the php package carrooi/labels. 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 labels

Carrooi/Labels

Build Status Donate

Labels module for Nette framework.

Now any doctrine entity can be turned to "labelable" entity (imagine your gmail mails with labels).

Installation

Configuration

Owner entity

Owner entity must implement Carrooi\Labels\Model\Entities\ILabelOwner interface with only one method:

LabelItem entity

Entity which must implement Carrooi\Labels\Model\Entities\ILabelItem interface with these methods:

Instead of implementing last two methods on your own, you can use prepared Carrooi\Labels\Model\Entities\TLabelItem trait.

Labelable entity

Last thing is to update your labelable entities, eg. our Mail entity.

Each labelable entity must implement Carrooi\Labels\Model\Entities\ILabelableEntity interface with these methods:

Again you don't need to implement these methods (except for getId()) on your own, but simply use Carrooi\Labels\Model\Entities\TLabelable trait.

Usage

The main idea is that you have more label namespaces in which you (or your users) can create new labels. Of course if you want, you can have just one main namespace and all labels in that namespace. Example of this aproach is eg. GitHub where your labels are shared between issues and pull requests.

These namespaces will be probably "hard-defined" in your project and database.

Label namespaces facade

For working with namespaces you can use registered service Carrooi\Labels\Model\Facades\LabelNamespacesFacade.

Create new namespace:

Find namespace:

Get all namespaces:

Rename namespace:

Remove namespace:

Labels facade

Now you can let your users create own labels. There is Carrooi\Labels\Model\Facades\LabelsFacade service for that.

Creating label:

Last argument is for "system name" of label and is not required. This can come in handy if you have some default labels and you want to work with them later.

Get all labels:

Find label by system name:

Find label by id:

Rename label:

You can replace 2nd and 3rd arguments with nulls.

Remove label:

Label items facade

Last facade class is Carrooi\Labels\Model\Facades\LabelItemsFacade which is again registered as service in DI container.

With this service you can manage actual labelable entities in created labels.

Add labelable item to label:

Find label item entity by labelable item:

Is labelable item in label?:

Get all label items in label:

Get labelable items by type:

Remove labelable item from label:

Changelog


All versions of labels with dependencies

PHP Build Version
Package Version
Requires nette/utils Version ~2.2
nette/di Version ~2.2
nette/application Version ~2.2
kdyby/doctrine Version ~2.2
kdyby/events Version ~2.3
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 carrooi/labels contains the following files

Loading the files please wait ....