You are here

public function HostingPlatformComposerForm::alter in Aegir Deploy 7.3

File

modules/platform_composer/includes/HostingPlatformComposerForm.inc, line 23
The HostingPlatformComposerForm class.

Class

HostingPlatformComposerForm
@file The HostingPlatformComposerForm class.

Code

public function alter() {
  $this
    ->disableField('field_composer_project_path');
  $this
    ->lockFields();
  $this
    ->moveFieldsIntoFieldset('platform_composer', $this->fields);
  $this->form['platform_composer']['#title'] = 'Deploy a Composer project from a Packagist repository';
  $this->form['platform_composer']['#description'] = '
<p>You may deploy this platform from a Composer package hosted on <a href="https://packagist.org/">Packagist</a>, the PHP package repository.</p>

<p>To provision a clean Drupal 8+ core codebase for Aegir, one would typically enter <em>web</em> for the Docroot, <em>aegir/drupal-project-composer</em> for the Composer Package Name, and <em>dev-aegir3-8.x</em> for the Composer Package Version.  For more information on that project, see <a href="https://packagist.org/packages/aegir/drupal-project-composer">the project page on Packagist</a>.</p>

<p>However, you will probably want to customize your installation after starting with this project as template, and then adding contributed and custom modules and themes.  To do that, use the <em>Deploy a Composer project from a Git repository</em> option instead, which allows you to clone from your own Git repository (once you\'ve created it).</p>

<p>It should be noted that this option is not currently working with repositories requiring Drush 9 due to <a href="https://www.drupal.org/project/provision/issues/2953349">Including Drush 9 in a Composer-based platform breaks Provision\'s Verify</a>.  Either fork the repository and remove the requirement (or move it to <em>require-dev</em> as the suggested-above repository does), or do this in your own Git repository using the <em>Deploy a Composer project from a Git repository</em> option instead of this one.</p>

<p><strong>Note:</strong> This activity will recalculate all dependencies, and thus, it is very resource-intensive. It requires a miminum of 4G of RAM; we advise against performing this activity in production.</p>
    ';
  $this
    ->addSubmitHandler('hosting_platform_composer_platform_submit');
}