function AllowedPackages::getOperationType
Determine the type of the provided operation.
Adjusts API used for Composer 1 or Composer 2.
Parameters
\Composer\DependencyResolver\Operation\OperationInterface $operation: The operation object.
Return value
string The operation type.
1 call to AllowedPackages::getOperationType()
- AllowedPackages::event in composer/Plugin/ Scaffold/ AllowedPackages.php 
- Handles package events during a 'composer require' operation.
File
- 
              composer/Plugin/ Scaffold/ AllowedPackages.php, line 195 
Class
- AllowedPackages
- Determine recursively which packages have been allowed to scaffold files.
Namespace
Drupal\Composer\Plugin\ScaffoldCode
protected function getOperationType(OperationInterface $operation) {
  // Use Composer 2 method.
  if (method_exists($operation, 'getOperationType')) {
    return $operation->getOperationType();
  }
  // Fallback to Composer 1 method.
  return $operation->getJobType();
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
