PHP code example of su-sws / stanford_install_tasks

1. Go to this page and download the library: Download su-sws/stanford_install_tasks library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

su-sws / stanford_install_tasks example snippets



/**
 * @file
 * Abstract Task Class
 */

namespace Organization\Group\Project\Install;
use \ITasks\AbstractInstallTask;

class MyInstallTaskName extends AbstractInstallTask {

  /**
   * Description of execute method.
   *
   * @param array $args
   *  Installation arguments.
   */
  public function execute(&$args = array()) {
    // Enable user picture support and set the default to a square thumbnail option.
    variable_set('user_pictures', '1');
  }

  /**
   * A list of 


/**
 * @file
 * Abstract Task Class.
 */
namespace Organization\Group\Project;
use \ITasks\AbstractUpdateTask;

/**
 *
 */
class MyUpdateTask extends AbstractUpdateTask {

  // Description of update task.
  protected $description = "Change the site name to my new site name";

  /**
   * Description of execute task.
   *
   * @param array $args
   *   Installation arguments.
   */
  public function execute(&$args = array()) {
    variable_set("site_name", "My New Site Name IS: " . md5(time()));
  }

}