Download the PHP package craftpulse/craft-timeloop without Composer

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

Timeloop for Craft CMS

Timeloop generates arrays of dates between a start and end date based on a frequency: recurring events, repeating classes, courses, payment schedules, all without complex recurrence inputs. Authors pick a start date, a frequency, and an interval; your templates get clean DateTime arrays back.

Features

Requirements

Installation

Standard Craft CMS Installation

  1. Open your terminal and navigate to your Craft project:

  2. Install the plugin via Composer:

  3. Install the plugin:

    Alternatively, activate it via Settings → Plugins in the Craft Control Panel.

Installing on DDEV

  1. Install the Timeloop plugin:

  2. Install the plugin in Craft CMS:

Or install through the Plugin Store: Settings → Plugins → Search "Timeloop".

Setting up the field

Create a new field and pick Timeloop as the field type. The field has one setting:

Authors then configure each entry's loop:

Templating

The examples below assume an events section with a Timeloop field whose handle is schedule.

Getting the computed dates

dates returns the upcoming occurrences as an array of DateTime objects (future dates only, capped at 100 by default):

Use getDates() to control the limit and whether past dates are included:

The generated dates take all field values into account: frequency, interval, weekly days, and monthly ordinals.

Upcoming occurrences

Both return null when the loop has no (more) upcoming dates, so guard accordingly:

The entered dates and times

The raw field values are available as DateTime objects (or null when not set):

The loop period

period returns the recurrence configuration:

For monthly loops, timestring returns the ordinal weekday configuration:

timestring is null when no timestring data is stored, and ordinal/day are the string 'none' when no selection has been made.

The reminder date

reminder returns the reminder date for the first upcoming occurrence, or null when no reminder is configured:

Collecting dates across entries

The recurringDates() Twig function expands a whole element query into recurring dates within a window, handy for calendars and agenda views. Pass the query, the Timeloop field handle, and a start and end date (boundaries are inclusive):

Each item contains entryId, entryTitle, and dates (an array of DateTime objects within the window, including past dates).

GraphQL

Querying

The field exposes the stored settings and the computed dates. Dates support Craft's @formatDateTime directive; loopStartTime and loopEndTime resolve to H:i strings.

Mutating

The field can be set through entry mutations. The input type accepts loopStartDate, loopEndDate, loopStartTime, loopEndTime, and a loopPeriod object:

For monthly loops, pass a timestring object with ordinal (First, Second, Third, Fourth, Last) and day (e.g. Saturday) inside loopPeriod. Reminder settings cannot be set through GraphQL.

Support

Brought to you by CraftPulse.


All versions of craft-timeloop with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2.0
craftcms/cms Version ^5.0.0
nystudio107/craft-plugin-vite Version ^5.0.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 craftpulse/craft-timeloop contains the following files

Loading the files please wait ...