Download the PHP package tobento/app-view without Composer

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

App View

The app view includes support for creating menus, forms and more for creating any kind of web applications. It comes with a default layout using the Basis Css which you may use or not. Some App Bundles may rely on this though.

Table of Contents

Getting Started

Add the latest version of the app view project running this command.

Requirements

Documentation

App

Check out the App Skeleton if you are using the skeleton.

You may also check out the App to learn more about the app in general.

View Boot

The view boot does the following:

Rendering Views

You can render views in several ways:

Using the app

Using autowiring

You can also request the in any class resolved by the app.

Using the view boot

Check out the View Service to learn more about it.

Using the responser

If you have booted the App Http - Requester And Responser boot, you may use the method:

Global View Data And Variables

It adds the following global view data and variables accessible in your view files:

$htmlLang / $locale

Code snippet from the view boot:

$routeName

Code snippet from the view boot:

Adding global data and variables

You may add more global data by using a boot:

Available View Macros

app

Returns the app instance.

assetPath

The function returns the fully qualified path to your application's asset directory.

menu

Returns the menu for the specified name.

Check out the Menu Service to learn more about it in general.

trans / etrans

Returns the message translated by the Translator if available within the app.

By default, the translator is not available, you might install the App Translation bundle to do so.

routeUrl

Returns the url for the specified route if is available within the app which is the case if the App Http - Routing Boot has been booted.

tagAttributes

Returns the attributes for the specified tag name.

Check out the Tag Service - Attributes Interface to learn more about it in general.

date / dateTime / formatDate

You may use , and methods to format and display any dates using the Date Formatter.

Menus Boot

The menus boot does the following:

Check out the Menu Service to learn more about it in general.

Using menus boot

You may add menu items using the menus boot:

Using the app on method

You may add menu items only if the menus is requested from the app.

Form Boot

The form boot does the following:

This boot requires the app-http bundle:

Check out the Form Service to learn more about it in general.

You might boot the App Http - Error Handler Boot which already handles exceptions caused by the form.

CSRF Protection

CSRF protection is implemented and csrf token will be verified by the registered VerifyCsrfToken Middleware.

CSRF Token

The form boot adds the CSRF Token to the global view data accessible in your view files:

X-CSRF-TOKEN

In addition to checking for the CSRF token as a POST parameter, the VerifyCsrfToken Middleware will also check for the request header.

When using the Default Layout, in the view file , the token will be stored in a HTML meta tag named :

You may use this meta tag to get the token while setting the header:

Form Messages

As is the default implementation you can pass messages to your form fields by the following way:

In your view file:

Messages Boot

The messages boot does the following:

Renders the passed view messages if they are an instance of :

Check out the Message Service to learn more about it in general.

Responser messages

Renders the message from the responser, if you have booted the App Http - Requester And Responser booted.

View files

In your view files, render the messages view:

Breadcrumb Boot

The breadcrumb boot does the following:

Adds the breadcrumb view and creates breadcrumb menu based on the main menu using the global view data to determine the active menu tree.

View files

In your view files, render the breadcrumb view:

You may set the active menu tree using the parameter:

You may use the parameter to specify the menu tree to be used, which may be useful if you want to modify the breadcrumb menu:

You may use the parameter to specify a custom breadcrumb menu:

Table Boot

The table boot does the following:

View file

Check out the Table Service to learn more about it in general.

Default Layout

Views

The default layout uses the and the Basis Css to style the view files.

A view file using the view boots may look like:

It is not recommended to alter existing views and assets as any app update may overwrite these files. Instead create a Theme.

Exception Views

The following exception views are available in your view directory:

You might install and boot the App Http - Error Handler Boot which will use these views to render html and xml excpetions.

Example using the responser to render an exception view

If you have booted the App Http - Requester And Responser boot, you may use the method:

Themes

Theme Views

You may create a "theme" to customize existing views and assets, otherwise any app update may overwrite these files.

First, create a theme boot:

Next, you just place the view file you want to customize in your specified directory. If the view file does not exist, it uses the default view file.

Theme Assets

You can handle your custom assets in the following ways:

Replacing assets

In your customized views you may just replace the assets by your custom assets:

Using an asset handler

You may create an asset handler to minify, combine or replace assets.

A default asset handler is in development to to minify, combine or replace assets!

Credits


All versions of app-view with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
tobento/app Version ^1.0
tobento/app-migration Version ^1.0
tobento/service-view Version ^1.0
tobento/service-uri Version ^1.0
tobento/service-menu Version ^1.1.0
tobento/service-form Version ^1.0
tobento/service-table Version ^1.0.2
tobento/service-language Version ^1.0
tobento/service-translation Version ^1.0
tobento/service-dater Version ^1.0.2
tobento/css-basis 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 tobento/app-view contains the following files

Loading the files please wait ....