Download the PHP package su-sws/stanford_install_tasks without Composer

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

Stanford Installation Tasks

Version: 7.x-1.8-dev

iTasks Installation Tasks

A collection of small chunks of code.

Used in conjunction with the iTasks installation profile to provide granular installation tasks.

Theory

Do one thing. And do it well! The concept behind this collection of code is to do one thing per file. This way the amount of change any one thing has is minimal. A smaller footprint will help with encapsulation and decoupling.

This collection of code should be sharable and re-usable. Keeping tasks well named and namespaced will help to reduce duplication of effort and collisions as multiple parties contribute to the shared code bank.

Creating a new namespace

When creating a new namespace for your installation profile be unique. An organization name, url, or group might help. For us at Stanford we have many sub groups and created a many level namespace: Eg: Stanford\WebServices\Jumpstart\JumpstartAcademic

This namespace would be for Stanford's Web Services group's Jumpstart Academic distribution from the Jumpstart distribution line.

Please follow PSR-4 naming conventions: http://www.php-fig.org/psr/psr-4/

Creating a new install task

Please follow PSR-4 naming conventions: http://www.php-fig.org/psr/psr-4/

Install tasks should always be placed in an Install folder and then named descriptively. Install task files should always be named the same as the class name. The class should always extend \ITasks\AbstractInstallTask. The AbstractInstallTask class is found in the installation profile and not in this repository. Each install task has one required method called execute. Please see the boilerplate code below.

Creating a new update task

Please follow PSR-4 naming conventions: http://www.php-fig.org/psr/psr-4/

Update tasks should always be placed in an Update folder and then named descriptively. Update task files should always be named the same as the class name. The class should always extend \ITasks\AbstractUpdateTask. The AbstractUpdateTask class is found in the installation profile and not in this repository. Each update task has one required method called execute and should include a $description variable. Please see the boilerplate code below.

Installation Task Anatomy

Variables

$displayName
string
The name displayed during installation through the UI

$display
bool
Wether to display the name in the UI or not.

$installType
string
See type: https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_install_tasks/7.x

$installRun
int
See run: https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_install_tasks/7.x

$installFunction
string
Has to be "itasks_run_install_task"

$description text
A description of what the install tasks is doing. Currently does not show up anywhere but there are future plans to use it.

Methods

execute(&$args)
REQUIRED The passed in $args is an array of installation task args that would normally be available to the install task. See: https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_install_tasks/7.x

This is the meat of the whole class. Add your specific functionality here.

requirements()
Returns an array of module machine names that are dependencies of this install task.

getMachineName()
Returns the machine name of this task.

setMachineName()
Sets the machine name of this task.

InstallTasksAlter(&$tasks)
The passed in parameter is an array of installation tasks. This function allows tasks to alter the array of installation tasks. This means they can change the order, add, or remove tasks conditionally.

getDisplayName()
Returns the value of $displayName or the classname if undefined.

getInstallDisplay()
Returns the value of $display.

getRunType()
Returns the value of $installRun.

getInstallType()
Returns the value of $installType.

getInstallFunction()
Returns the value of $installFunction.

setDescription($desc)
Sets the value of $description with the passed in value.

getDescription()
Returns the value of $description or default text if not set.

form()
Return form elements to add to the installation configuration form. This form is used through the UI and should be the place to supply your variables. These form elements are available to drush through the parameter: installation_configuration_form.element_name=something_value

validate()
Validation hook for the installation configuration form method.

submit()
Submit hook for the installation configuration form method.


All versions of stanford_install_tasks with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ^1.2
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 su-sws/stanford_install_tasks contains the following files

Loading the files please wait ....