Download the PHP package fede91it/fof-nnrelation without Composer

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

F0F NNRelation

FOF NNRelation add support to many-to-many relations into FOF (Framework on Framework). In truth it's for FOF! It consist in a set of one F0FTableBehavior, one F0FModelBehavior and one F0FFormField. Add all these magic classes to get ready to use multiple relations (with pivot tables) in your F0F projects, with ease!

Requirements

  1. Joomla 3.x (it should works also with 2.5.x)
  2. FOF 2.3.x or greater (download Framework on Framework

Preparation

  1. Install lib_f0f-nnrelation-1.0.0.tgz library extension
  2. Create a dispatcher.php file for your FOF component
  3. Override the method onBeforeDispatch
  4. Before calling parent::onBeforeDispatch include f0f-nnrelation in this way:

Usage

Table Behavior

In your form.form.xml files you can use a new type of field called nnrelation.

The name attribute must be the same of the name of the multiple relation you declared in the fof.xml file. In the exemple above, the multiple relation I want to manage is declared in this way:

As you see, you must enable the specific FOF behavior for the table in which you want to use the multiple relation. In this example, the multiple relation will be automagically managed for all team items that want to trace their players. If you want to do viceversa, you have to declare the contrary teams relation for the player table, and enabling the behavior there. The names respects the standard FOF singular/plural conventions.

Model Behavior

In the front-end of your component you want to retrieve your multiple relations with ease. For this purpose you can enable the nnrelation behavior for a view, and if here there is a multiple relation declared, all related items will be automagically retrieved.

Now in your list views, the $this->items data object will contains a property named as the relation. Instead, you will have $this->item in a item view.

Form Field

In your form.default.xml files you can use a new type of field called nnrelation.

Also in this case, the name of the field should reflect the name of the multiple relation declared in fof.xml. The other attribures are inherited from the list form type (see FOF documentation). The placeholder [ITEM:FOOBAR_PLAYER_ID] is the name of the key value for your referred table, in the pivot table.

Form Header

Coming Soon...


All versions of fof-nnrelation with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
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 fede91it/fof-nnrelation contains the following files

Loading the files please wait ....