Skip to content

Instantly share code, notes, and snippets.

@neclimdul
Created November 9, 2018 17:32
Show Gist options
  • Save neclimdul/543e1f872c2356e92bc622fe61848ce6 to your computer and use it in GitHub Desktop.
Save neclimdul/543e1f872c2356e92bc622fe61848ce6 to your computer and use it in GitHub Desktop.
<?php
namespace Drupal\custom_dve\Commands;
use Drush\Commands\core\LoginCommands;
use Drush\Commands\DrushCommands;
use Drush\SiteAlias\SiteAliasManagerAwareInterface;
class LoginsCommand extends DrushCommands implements SiteAliasManagerAwareInterface {
/**
* @var \Drush\Commands\core\LoginCommands
*/
protected $loginCommand;
public function __construct() {
parent::__construct();
$this->loginCommand = new LoginCommands();
}
/**
* APQC Logins
*
* @command user:apqc_logins
*/
public function logins() {
$this->loginCommand->login('', ['name' => 'dev_user']);
$this->loginCommand->login('', ['name' => 'content_editor']);
$this->loginCommand->login('', ['name' => 'member']);
}
/**
* {@inheritdoc}
*/
public function setSiteAliasManager($siteAliasManager) {
$this->loginCommand->setSiteAliasManager($siteAliasManager);
}
/**
* {@inheritdoc}
*/
public function siteAliasManager() {
return $this->loginCommand->siteAliasManager();
}
/**
* {@inheritdoc}
*/
public function hasSiteAliasManager() {
return $this->loginCommand->hasSiteAliasManager();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment