Checks for supported project type operations and returns array of OperationResult instances

@return OperationResult[]
498536
public function handleInstall(): array
    {
        $result = [];

        $handlers = AbstractOperation::getOperationHandlers($this->composer);
        $handlersMap = [];

        foreach ($handlers as $handler) {
            $handler = new $handler($this->package, $this->projectType, $this->composer);
            if ($handler instanceof SupportedProjectTypesInterface) {
                if (in_array($this->projectType->getMachineName(), $handler->getSupportedProjectTypes())) {
                    $handlersMap[] = $handler;
                }
            }
        }

        foreach ($this->projectType->getTypes() as $type) {
            if (isset($handlers[$type])) {
                $class = $handlers[$type];
                /** @var AbstractOperation $handler */
                $handler = new $class($this->package, $this->projectType, $this->composer);
                $handlersMap[] = $handler;
            }
        }

        foreach ($handlersMap as $handler) {
            if ($handler instanceof AvailableOperationInterface) {
                if (!$handler->isAvailable()) {
                    continue;
                }
            }
            $result[] = $handler->install();
        }

        return $result;
    }
250189
protected function getProjectOptions()
    {
        $config = ProjectX::getProjectConfig();

        $type = $config->getType();
        $options = $config->getOptions();

        return isset($options[$type])
            ? $options[$type]
            : [];
    }
609103
public static function getSupportedMethods()
    {
        return [
            Remote\Request::METHOD_POST,
            Remote\Request::METHOD_PUT,
            Remote\Request::METHOD_GET,
        ];
    }
104988
public static function getOperatorsList()
    {
        // Build $operatorValues if this is the first call
        if (null === static::$operatorValues) {
            static::$operatorValues = [];
            $refClass = new \ReflectionClass(static::class);
            $classConstants = $refClass->getConstants();
            $className = $refClass->getShortName();

            $constantPrefix = 'OPERATOR_';
            foreach ($classConstants as $key => $val) {
                if (\substr($key, 0, \strlen($constantPrefix)) === $constantPrefix) {
                    static::$operatorValues[] = $val;
                }
            }
        }

        return static::$operatorValues;
    }
1144774
public function getAllowedOperations()
    {
        return [
            self::OPERATION_REQUEST,
            self::OPERATION_CANCEL,
            self::OPERATION_APPROVE,
            self::OPERATION_REJECT,
            self::OPERATION_QUERY,
        ];
    }
457087
public function getOperations()
    {
        $functions = array();
        foreach ($this->soapClient->__getFunctions() as $functionString) {
            $function = new OperationNode($functionString);
            $functionNodes = $this->xpath('//wsdl:operation[@name=%s]', $function->getName());
            if ($functionNodes->length > 0) {
                $function->setElement($this->document, $functionNodes->item(0));
                $functions[] = $function;
            }
        }
        return $functions;
    }
519657
protected function getOperationWithParams()
    {
        $params    = [];
        $operation = $this->initiate($params);
        if ($operation == 'JOBRESULTS_CREATED') {
            $operation = $this->job($params);
        } else {

            $found = false;
            $url   = $this->getUrlPattern();
            $map   = [];
            if (!is_null($this->model->new_value)) {
                $map    = $this->getReplacementKeys();
                $values = $this->getReplacementValues();
                $title  = $this->getTitle($this->model->new_value);
                $found  = $this->urlFillable($url, $map);
            } else {
                $title = $this->getTitle($this->model->old_value);
            }
            array_set($params, 'owner_id', ($found && strlen($url) > 0) ? $this->link($map, $values, $url, $title) : $title );

            $operation = $this->getRelationData($params, $map);
        }
        $this->fill($params);
        return [$operation, $params];
    }
354893
protected function getProjectInstance()
    {
        $project = ProjectX::getProjectType();

        if (!$project instanceof PhpProjectType) {
            throw new \Exception(
                'These tasks can only be ran for PHP based projects.'
            );
        }
        $project->setBuilder($this->getBuilder());

        return $project;
    }
932903
public function toOperations()
    {
        $operations = [];

        foreach ($this->entries as $entry) {
            $this->setupEntry($entry);
            $operations[] = $entry->toOperation();
        }

        return $operations;
    }
29767
protected function sortOperatorsToArray()
    {
        return array_merge(
            $this->operators['and'],
            $this->operators['or'],
            $this->operators['not'],
            $this->operators['comparison'],
            $this->operators['wildcard'],
            $this->operators['matchingrule']
        );
    }
1372747
def _get_project_types(self):
        """"""
        project_types = get_available_project_types()
        projects = []

        for project in project_types:
            projects.append(project.PROJECT_TYPE_NAME)

        return projects
1088594
public function asArray(): array
    {
        $data = [
            'name' => $this->project->getName(),
            'path' => $this->project->getPath(),
        ];
        if (($foregroundColor = $this->project->getForegroundColor())) {
            $data['foreground_color'] = $foregroundColor;
        }
        if (($backgroundColor = $this->project->getBackgroundColor())) {
            $data['background_color'] = $backgroundColor;
        }

        return $data;
    }
1236513
public static function get_runnable() {
		$packages = [];
		$packages[] = 'project';
		foreach (\Skeleton\Core\Skeleton::get_all() as $package) {
			$packages[] = $package->name;
		}
		$migrations = [];
		foreach ($packages as $package) {
			$migrations[$package] = \Skeleton\Database\Migration::get_between_versions($package, self::get_version($package), null);
		}

		$sorted_migrations = [];

		foreach ($migrations as $package_migrations) {
			foreach ($package_migrations as $migration) {
				$sorted_migrations[$migration->get_version()->format('YmdHis')] = $migration;
			}
		}
		ksort($sorted_migrations);

		return $sorted_migrations;
	}
1349470
private function getExtensionsInfo(array $projects) {
    $value = [];
    uasort($projects, 'system_sort_modules_by_info_name');
    /** @var \Drupal\Core\Extension\Extension $project */
    foreach ($projects as $project) {
      $name = $project->getName();
      $info = $project->info;
      unset($info['dependencies']);
      $value[$name] = [
        'type' => $project->getType(),
        'name' => $name,
        'status' => $project->status,
        'origin' => $project->origin,
        'info' => $info,
      ];
    }
    return $value;
  }
753750
public function getOperands()
    {
        $operandValues = [];
        foreach ($this->getOperandObjects() as $operand) {
            $value = $operand->getValue();

            if ($value === null) {
                continue;
            }

            if ($operand->isMultiple()) {
                $operandValues = array_merge($operandValues, $value);
            } else {
                $operandValues[] = $value;
            }
        }

        return array_merge($operandValues, $this->additionalOperands);
    }
785134
private function getBelongTo(): array
    {
        $result = [];

        if (! isset($this->capabilities['action'][Utils::getTypeBelongs()])) {
            return $result;
        }

        $table = TableRegistry::getTableLocator()->get('RolesCapabilities.Capabilities');
        Assert::isInstanceOf($table, CapabilitiesTable::class);

        $groups = $table->getUserGroups($this->user['id']);
        // check user capabilities against action's belongs capabilities
        foreach ($this->capabilities['action'][Utils::getTypeBelongs()] as $capability) {
            if (in_array($capability->getName(), $this->capabilities['user'])) {
                // if user has owner capability for current action add appropriate conditions to where clause
                $result[$this->table->aliasField($capability->getField()) . ' IN'] = array_keys($groups);
            }
        }

        return $result;
    }
59436
protected function getResourceMethodConfiguration(): array
    {
        return [
            ResourceMethodEnum::GET_ALL => RequestPathFormatEnum::TASKS,
            ResourceMethodEnum::GET_ALL_FOR_FOLDER => RequestPathFormatEnum::TASKS_FOR_FOLDER,
            ResourceMethodEnum::GET_BY_ID => RequestPathFormatEnum::TASKS_BY_ID,
            ResourceMethodEnum::GET_BY_IDS => RequestPathFormatEnum::TASKS_BY_IDS,
            ResourceMethodEnum::CREATE_FOR_FOLDER => RequestPathFormatEnum::TASKS_FOR_FOLDER,
            ResourceMethodEnum::UPDATE => RequestPathFormatEnum::TASKS_BY_ID,
            ResourceMethodEnum::DELETE => RequestPathFormatEnum::TASKS_BY_ID,
        ];
    }