Download the PHP package webx-ui/module-menu without Composer

On this page you can find all versions of the php package webx-ui/module-menu. 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 module-menu

webx-ui/module-menu

Menus for the WebX UI admin panel. One tree per menu, items that point at an entity, at a path, or deliberately nowhere — and a helper that hands a template the finished links rather than markup to override.

Requirements

Install

Which menus the site has is a matter of configuration:

A declared menu is one a template asks for by name. It shows up in the panel straight away, empty; its row in menus appears the first time somebody saves it. It can be emptied, but not deleted and not renamed — a template refers to the spelling. An administrator can also make a menu of their own in the panel and remove it there.

Reading a menu

A MenuLink has label, url, children, isHeading, variant, newTab, rel, isActive(), isCurrent() and attrs() — href, target and rel in one array. url is null for an item that goes nowhere: a group heading, a separator.

There is a component too, and it is second on purpose — every real site has its own markup:

What an item points at

Target What is stored What the render does
entity a morph pair asks the module for the address and the name
url a path or a whole address prefixes a path with the language, leaves the rest
none nothing url is null

An item with no label of its own is called what the entity behind it is called, so renaming a page renames the item. An anchor is a field of its own, kept without its #, and works for either kind of target.

An item is left out of the render when it is hidden, when its locales do not name the language being drawn, when nothing in that language gives it a label, or when the module that owns its entity says the site would not show it right now — a draft page keeps its address and is still a page nobody can open.

Highlighting

isActive() is true on the page itself, on anything below it, and on an item one of whose children is active. The front page is the exception: its path is empty, so only an exact match counts — otherwise it would be highlighted on every page of the site. isCurrent() is the exact match alone.

The cache

A built menu is kept per menu and per language, without the highlighting, which is worked out on every request. Anything that changes what a menu looks like forgets it: saving, deleting or moving an item, saving a menu, a row changing in the address registry, and publishing, renaming or deleting any entity an item points at. The last of those is the one nothing else covers — publishing a page changes no address at all.

A write that goes round the models — a mass update, an import, a hand-written UPDATE — has to call that itself; there are no events to hear. So does anything the panel's reset button does not cover. Beyond that there is a TTL of an hour, so a miss grows out on its own.

If an edit does not seem to arrive, switch the cache off first: that failure looks like a broken save, not like a cache.

mergeConfigFrom merges one level deep, so a published copy of the config that names one key inside cache replaces the section. Both values are read with a default of their own.

Languages

One tree for every language, with the labels translated: an item points at an entity, and that entity already has a row per language in the address registry, so the same item resolves to the right address in each. locales on an item is for the case a second tree would have covered — something in the English footer that is not in the Russian one.

en, ru, uk, de, pl, fr, es, it, pt, tr. Only English, Russian and Ukrainian have been read by a speaker.

Licence

MIT.


All versions of module-menu with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^13.0
illuminate/database Version ^13.0
illuminate/http Version ^13.0
illuminate/routing Version ^13.0
illuminate/support Version ^13.0
illuminate/validation Version ^13.0
illuminate/view Version ^13.0
webx-ui/localization Version ^0.46.0
webx-ui/mcp Version ^0.46.0
webx-ui/module-admin Version ^0.46.0
webx-ui/nested-set Version ^0.46.0
webx-ui/routing Version ^0.46.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 webx-ui/module-menu contains the following files

Loading the files please wait ...