Download the PHP package justinholtweb/craft-yo without Composer

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

Yo for Craft CMS 5

A flash-message bus that plugins talk to.

Craft has setNotice(). It is one string, for one person, on the next page load, with no type beyond notice and error, no buttons, no way to reach anybody else, and no way for the plugin that sent it to ever learn whether it was seen.

Yo is the layer that answers all of those — once — so that thirty plugins do not each answer them differently. It is a plugin for plugins.

Messages arrive in a floating control panel panel you can drag wherever you like, on your own front end in markup you style yourself, or anywhere else a plugin has taught Yo to reach.

Free. One edition. No paid tier. It is infrastructure — it is worth more the more plugins use it, and a price would be a tax on that.

Requirements

Installation

Or find Yo in the Craft Plugin Store.

What you get on day one, without changing any plugin

Switch Adopt Craft's own notices on — it is on by default — and every plugin on the site that calls setNotice(), setSuccess() or setError() shows up in the panel instead of Craft's toast. They do not know Yo exists. They do not have to.

What you get if you write to it

Craft's flash Yo
Types notice, error five, and a plugin can register its own
Buttons any number, links or POSTs
Recipients whoever is making the request anyone, a group, or everybody
Lifetime the next page load until dismissed, or a time to live
Repeats stacks up a dedupe key replaces the earlier one
Did they see it? no answer shown / read / dismissed / actioned, each an event
Where the control panel the control panel, the front end, or a channel you wrote

Events

Everything is a seam. Nothing in Yo is a special case another plugin could not have built.

Event What it is for
Messages::EVENT_BEFORE_SEND Edit or suppress a message — including somebody else's
Messages::EVENT_AFTER_SEND Know that one went, and where
Messages::EVENT_DEFINE_DELIVERY Route a message to a channel it never asked for
Messages::EVENT_MESSAGE_SHOWN It reached a screen
Messages::EVENT_MESSAGE_READ Somebody opened it
Messages::EVENT_MESSAGE_DISMISSED Somebody closed it
Messages::EVENT_MESSAGE_ACTIONED Somebody pressed one of its buttons
Messages::EVENT_MESSAGE_EXPIRED It ran out of time before anybody looked
Types::EVENT_REGISTER_MESSAGE_TYPES Add a type with its own colour, icon and stickiness
Channels::EVENT_REGISTER_CHANNELS Add a destination — Slack, e-mail, a webhook

Three template hooks let a plugin put its own markup inside the panel: yo.panel.header, yo.panel.footer, yo.message.meta.

The front end

Yo ships no front-end stylesheet, deliberately. What a warning looks like on your site is a design decision, and a plugin that arrives with an opinion about border radius is a plugin that gets ripped out.

That registers the behaviour and puts a container where you put the tag. Style .yo-message, .yo-message--error and friends however you like — or drop a yo/_messages.twig into your own templates directory and take the markup over outright.

Ajax without the Ajax

The panel updates itself with DataStar, vendored — no CDN, no build step, no framework in your control panel. Dismissing, acting on and clearing a message all post to the server and get back rendered HTML, which the client morphs into place. There is no client-side template of a message anywhere, so a type a third-party plugin registered looks exactly as right as one of Yo's own.

Console

Documentation

Full docs at justinholt.com/plugins/craft-yo.

Who is the alien

An original character, drawn for this plugin: a furry, snouted, wisecracking houseguest from a faraway planet who will not stop shouting from the corner of your control panel. Any resemblance to a certain 1980s sitcom is affectionate and entirely the point.

License

The Craft License. See LICENSE.md.


All versions of craft-yo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
craftcms/cms 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 justinholtweb/craft-yo contains the following files

Loading the files please wait ...