Download the PHP package mcms/front-end without Composer

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

FrontEnd

View composers

Upon installation a new service provider is installed "ViewComposerServiceProvider". This provider is responsible for containing all of your view composers, for example menus, sidebars etc. It comes with a menu composer which looks for header-menu and footer-menu slugs to pass them on to the partials.header and partials.footer views as $HeaderMenu and $FooterMenu respectively. Any new composers should be registered in that service provider

Editable regions

An editable region is a part in the layout that you can either allow the user to add types of content or you can add stuff by using a class. It needs to be configured in the "editableRegions.php" file in the config folder. Each region can be either of type generic or class. Each item must have a type and an item property to be valid

OR

If it is of type class you need to provide the class name

This allows for creating sort of widgets that the user cannot edit (e.g. latest articles) but you can allow the user to change custom settings of yours, like results per page.

This can be very powerful when you need to add custom logic to your area or need to be sure that the user will not "break" something.

The generic type is versatile and extremely powerful. It allows any type of content to be presented in that area. The default types are :

Using the API

Start using the API by filtering the region, for example the front page regions is what you want

The $regions object now holds all the editable regions for the frontPage layout. The quickest way to proceed is to do a simple which will get you all of the regions.

Usually though, we need to process the regions, cause if they contain items, we need to get them from the DB. So we need to do a in order to go to the DB and fetch the actual items.

Remember, the actual item will be in the "item" property.

Sometimes, we know how our layout is going to be and for example, we know that we only need to process 1 or 2 regions, thus we filter for improved performance. . This will only process the 2 regions mentioned in the array.

There can be a case where we only need one region. We can filter it down and the result will not be an array, but the actual object (like doing a $regions[0]).

This will fetch the slider region, processed as a single object.

Process multiple regions

which will return a named array of the results

A word of caution

Though editable regions can be extremely powerful and handy to use, try not to overdo it. Giving total control to the user can break the design or possibly make that layout slow because of all the stuff the user is adding

Layouts

typical config

Layouts support settings that can be filled by the user and they are saved in the item settings field. You can use them to customize your layouts.

API

First of you can access the item layout via the property. Then, you can find the layout using the layout manager

The second parameter refers to whether you choose to process the layout or not, doing so, it wil fetch all layout data (execute classes, fetch items, etc).

If you have set the 'beforeRender' option, then you will get a handler class back which you can use to get the result of your "beforeRender" class. For example, we have a class which grabs a single id set in the layout settings and fetches that page as an object. You can gain access to that object simply by doing this :

The parameters in the handle class are just an example of how you can pass whatever you feel like to that handler class

You can add a new layout at runtime by calling the method like so


All versions of front-end with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~5.1
php Version ~5.5|~7.0
ps/image-optimizer Version ^1.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 mcms/front-end contains the following files

Loading the files please wait ....