Download the PHP package macfly/yii2-taxonomy without Composer

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

yii2-taxonomy

Yii2 Taxonomy management. A component which adds generic taxonomy functionalities to your application. The component comes with a couple of term definitions(tags, properties). Those definitions can be enable on any models by adding the chossen behavior. This extension depends of yii2-taxonomy-term (by mhndev).

Installation

The preferred way to install this extension is through composer.

Either run

or add

to the require section of your composer.json file.

Migration

Usage

Configuring to manage Taxonomy and Term in web interface

Configure config/web.php as follows

Configuring to use Term

Configure model as follows

get terms of an entity

set terms of an entity (will remove all other term)

detach a term from an entity

check if term exist on entity

add term to an entity (will keep others term)

Configuring to use Property and Term

Properties are taxonomy of defined 'type' and they have name and value. You can add multiple properties to an item. And a property can have multiple 'name' and values to an item.

Configure model as follows

get terms for property 'env' of an entity

set terms for property 'env' of an entity (will remove all other term for property 'env')

detach property 'env' by is name and value from an entity (if you want to detach it by term, just use delTerm($term))

check if property 'env' exist by name and value on entity (if you want to check it by term, just use hasTerm($term))

add property 'env' by name and value to an entity (will keep others term, if you want to add it by term, just use addTerm($term))

Configuring to use Tags, Property and Term

Basically tags represent properties of type 'tag' and name 'name'. You can add multiple tags to an item.

Configure model as follows

You can change 'tag' taxonomy type and name for a specific model with the following :

get tags of an entity

set tags of an entity (will remove all other term)

detach a tag from an entity

check if tag exist on entity

add tag to an entity (will keep others tag)

Configuring to purge unused Term

Basically unused Term will be delete in the period of time (default is 30 day) it's help to remove useless tag.

Configure route for action config/console.php as follows:

Default term will be delete if _updatedat later than one month, if you want to define specific period time, just specify it on command line:

And you can add a cron job (http://www.crontab-generator.org/) to run at 00:00 on every Sunday with some controller action like this:

on Linux:

on Window Task Schedule:


All versions of yii2-taxonomy with dependencies

PHP Build Version
Package Version
Requires mhndev/yii2-taxonomy-term Version 1.*
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 macfly/yii2-taxonomy contains the following files

Loading the files please wait ....