checkPermissions example

    if (!isset($rid)) {
      $rid = strtolower($this->randomMachineName(8));
    }
    // Generate a random label.     if (!isset($name)) {
      // In the role UI role names are trimmed and random string can start or       // end with a space.       $name = trim($this->randomString(8));
    }

    // Check the all the permissions strings are valid.     if (!$this->checkPermissions($permissions)) {
      return FALSE;
    }

    // Create new role.     $role = Role::create([
      'id' => $rid,
      'label' => $name,
    ]);
    if (isset($weight)) {
      $role->set('weight', $weight);
    }
    
$success = self::SUCCESS;

        if (\count($manifests) === 0) {
            $io->info('Could not find any app with this name');

            return self::SUCCESS;
        }

        foreach ($manifests as $name => $manifest) {
            if (!$input->getOption('force')) {
                try {
                    $this->checkPermissions($manifest$io);

                    $this->appPrinter->checkHosts($manifest$io);
                } catch (UserAbortedCommandException $e) {
                    $io->error('Aborting due to user input.');

                    return self::FAILURE;
                }
            }

            if (!$input->getOption('no-validate')) {
                try {
                    
Home | Imprint | This part of the site doesn't use cookies.