Download the PHP package feskol/php-navigation without Composer

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

PHP-Navigation

GitHub Release GitHub License Packagist Downloads codecov

Overview

A simple and effective Navigation to manage active states in navigation structures.
For Symfony integration, check out the NavigationBundle.

Features

Installation

Install via Composer:

Usage

Building Your Navigation Structure

Iterating through Navigation links:

Common link data

The Link class provides setter and getter methods for the common attributes of an <a>-tag.
The most commonly used ones are href="" and target="":

To view all available methods for the common link data, check out the AbsctractHyperLink class.

Additional Data

There are often situations where you need additional data for your navigation, such as icons or images.
The best approach is to create your own class (e.g. MyCustomLink) that extends the Link class:

Then use your MyCustomLink class instead of the Link class:

Handling translations in your frontend

Symfony

In Symfony, you can use the TranslatableMessage class to hold translation infos which you can use in your frontend.
In Twig, apply the |trans filter to translate the TranslatableMessage.

Both the Navigation and Link classes accept any object implementing the \Stringable interface in their setTitle() methods. This allows you to pass objects like TranslatableMessage or custom classes with a __toString() method.

Example in Symfony

And then in your Twig template:

`

Contribution Guidelines

We welcome contributions to this project! To ensure clarity and fairness for all contributors, we require that all contributors sign our Contributor License Agreement (CLA).

By signing the CLA, you confirm that:

  1. You grant us the perpetual, worldwide, non-exclusive, royalty-free, irrevocable right to use, modify, sublicense, and distribute your contribution as part of this project or any other project.
  2. You retain ownership of your contribution, but grant us the rights necessary to use it without restriction.
  3. Your contribution does not violate the rights of any third party.

How to Sign the CLA

Before submitting a pull request, please sign the CLA using the following link:
Sign the CLA

Contributions cannot be merged unless the CLA is signed.

Thank you for your contributions and for helping us build something great!

Testing

We're using phpunit.

Run tests:

❤️ Support This Project

If you find this project helpful and would like to support my work:

Thank you for your support!


All versions of php-navigation with dependencies

PHP Build Version
Package Version
Requires php Version ^8.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 feskol/php-navigation contains the following files

Loading the files please wait ....