Download the PHP package wieni/wmdummy_data without Composer

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

wmdummy_data

Latest Stable Version Total Downloads License

Provides Drupal services and Drush 9 commands for easy creation of dummy data.

Installation

This package requires PHP 7.1 and Drupal 8.7.7 or higher. It can be installed using Composer:

How does it work?

Creating factories and states

To learn more about how to define your factory and state classes, please refer to the wieni/wmmodel_factory docs.

In order to have access to the following functionality, you need to extend EntityStateBase instead of the classes provided by wmmodel_factory.

Generate content using wieni/wmcontent

To generate content for an entity using the wmcontent module, make your generator implement ContentGenerateInterface.

Example

Generate entities to reference

To populate entity reference fields with new or existing entities, use the following methods in your generator:

Example

Generate links to Vimeo and YouTube videos

To get access to existing links to Vimeo and YouTube videos in your generators, use the following methods:

Example

Pick a random element from an array using weights

To get a random element from an array with some elements having a bigger chance to be returned than others, use the following method in your generators:

passing an array with the values as keys and weights as values, in the form of integers.

Example

Generate strings of HTML

To generate random strings of HTML, use one of the following methods in your generators:

Drush commands

This package provides a couple of Drush commands for managing dummy data:

For more information about command aliases, arguments, options & usage examples, call the command with the -h / --help argument

User interface

If you prefer working with the Drupal administration interface over using the CLI, you can use the form at /admin/config/development/wmdummy-data. This page can also be found through the administration menu (Configuration > Development > Dummy data).

Only users with the generate dummy data and/or delete dummy data permissions can use these features through the administration interface.

Events

You can subscribe to the following events to attach custom logic to the dummy data generation process:

Drupal\wmdummy_data\DummyDataEvents::MAKE

Will be triggered after an entity is generated.

Drupal\wmdummy_data\DummyDataEvents::CREATE

Will be triggered after an entity is generated and persisted to the database.

Changelog

All notable changes to this project will be documented in the CHANGELOG file.

Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

License

Distributed under the MIT License. See the LICENSE file for more information.


All versions of wmdummy_data with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
drupal/core Version ^9.3 || ^10.0
fakerphp/faker Version ^1.10
wieni/wmmodel_factory Version ^2.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 wieni/wmdummy_data contains the following files

Loading the files please wait ....