Download the PHP package shomeya/shomeya_utility without Composer

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

Shomeya Utility module for Drupal

This module provides several useful features, such as an environment indicator, a style guide, some render elements and template functions/helpers.

Build metadata

This module provide a helper class to access information about the build, such as latest Git commit, date, time, as well as who and where the build was packaged. This information is available in the status report at admin/reports/status. It also includes links to Github for relevant commits as long as the Github URL is set in settings.php:

Environment indicator

An environment indicator is available that provides text and an icon indicating which environment you are viewing:

This functionality is based on the enviroment specified in the settings.json file and is mapped in src/Environment.php.

Style Guide

This module provides a sample style guide at styleguide/web with additional pages for form elements and Drupal elements at styleguide/web/drupal/form and styleguide/web/drupal/elements.

Elements

A time element is defined in src/Element/Time.php. This element also supports optionally rendering as a dynamic 'time ago' with Javascript if the option is enabled.

Template functions/helpers

There are several helper function that are exposed to Twig templates:

URL from URI

This helper turns a Drupal URI (such as internal:/about-us , entity:node/1234, or base:robots.txt) into a fully qualified URL:

It supports options that will be based to Url::fromUri() such as query, absolute, https, and more:

Time

Supports creation of a time element from a timestamp:

It supports an optional value to be displayed if you wish to customize the date display:

Finally it supports all options that can be passed to the time element, and additional options for generating a value if one is not provided:

The last example will output something like:

Time ago

Support time element from timestamp with timeago set to true:

The output will be:

This also automatically includes jquery.timeago.js which will format the value as a time ago, such as 'less than a minute ago.'

This support the same options for value and options as the time helper.

Time From String

This function supports generating a time element from a date string parsed with strtotime():

Also allows for value, options.

Time ago from string

Supports generating a time ago tag from a string:


All versions of shomeya_utility with dependencies

PHP Build Version
Package Version
No informations.
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 shomeya/shomeya_utility contains the following files

Loading the files please wait ....