Get the list of all available capabilities.
@return array[]  Returns an array containing information about each capability
3701
public function getAvailableCapabilities()
    {
        Piwik::checkUserHasSomeAdminAccess();

        $response = array();

        foreach ($this->capabilityProvider->getAllCapabilities() as $capability) {
            $response[] = array(
                'id' => $capability->getId(),
                'name' => $capability->getName(),
                'description' => $capability->getDescription(),
                'helpUrl' => $capability->getHelpUrl(),
                'includedInRoles' => $capability->getIncludedInRoles(),
                'category' => $capability->getCategory(),
            );
        }

        return $response;
    }
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;
    }
484166
def get_capabilities(cls):
        """"""
        capabilities = []
        for _cls in cls.mro():
            if issubclass(_cls, Capability) and _cls is not Capability \
              and not issubclass(_cls, Model):
                capabilities.append(_cls)
        return capabilities
196944
public function toArray()
    {
        return [
            'platform'        => $this->platform,
            'environment'     => $this->environment,
            'version'         => $this->version,
            'majorVersion'    => $this->majorVersion,
            'minorVersion'    => $this->minorVersion,
            'patchVersion'    => $this->patchVersion,
            'deviceOsVersion' => $this->deviceOsVersion,
            'device'          => $this->device,
        ];
    }
253756
public function getStatusAllowableValues()
    {
        return [
            self::STATUS_OK,
            self::STATUS_ERROR,
            self::STATUS_WAITING,
            self::STATUS_CREATING,
            self::STATUS_RESTORING,
            self::STATUS_DELETING,
        ];
    }
389585
public function getTypeAllowableValues()
  {
    return [
      self::TYPE_HOME,
      self::TYPE_WORK,
      self::TYPE_MOBILE,
      self::TYPE_OTHER,
      self::TYPE_NULL,
    ];
  }
891839
public function getStatusAllowableValues()
    {
        return [
            self::STATUS_DRAFT,
            self::STATUS_SENT,
            self::STATUS_ARCHIVE,
            self::STATUS_QUEUED,
            self::STATUS_SUSPENDED,
            self::STATUS_IN_PROCESS,
        ];
    }
842124
public static function all()
    {
        return array(
            self::ENABLED,
            self::DISABLED,
            self::TYPE_NOT_FOUND,
            self::TYPE_NOT_ENABLED,
            self::INVALID,
        );
    }
173212
public function getActionAllowableValues()
    {
        return [
            self::ACTION_ADD,
            self::ACTION_ASSEMBLE,
            self::ACTION_CONFIGURE,
            self::ACTION_ENTER_PASSWORD,
            self::ACTION_LOCK,
            self::ACTION_MOVE,
            self::ACTION_REPACKAGE,
            self::ACTION_SET_NAME,
            self::ACTION_SET_PASSWORD,
            self::ACTION_UNLOCK,
        ];
    }
846410
def registered_capabilities(self):
        
        return dict ([ (CAPABILITIES[c.id],c) for c in self.capabilities
                 if c.id in CAPABILITIES ])
1260581
public function listAvailableStates(): array
    {
        if (!empty($this->states) && \is_array($this->states)) {
            return \array_keys($this->states);
        } else {
            return [];
        }
    }
78941
public function admin_capabilities( $capabilities ) {

		foreach ( $this->components as $component => $component_data ) {
			if ( ! empty( $component_data['Hide'] ) ) {
				continue;
			}

			if ( ! pods_developer() ) {
				if ( true === (boolean) pods_v( 'DeveloperMode', $component_data, false ) ) {
					continue;
				}

				if ( true === (boolean) pods_v( 'TablelessMode', $component_data, false ) ) {
					continue;
				}
			}

			if ( empty( $component_data['MenuPage'] ) && ( ! isset( $component_data['object'] ) || ! method_exists( $component_data['object'], 'admin' ) ) ) {
				continue;
			}

			$capability = 'pods_component_' . str_replace( '-', '_', sanitize_title( str_replace( ' and ', ' ', strip_tags( $component_data['Name'] ) ) ) );

			if ( 0 < strlen( $component_data['Capability'] ) ) {
				$capability = $component_data['Capability'];
			}

			if ( ! in_array( $capability, $capabilities, true ) ) {
				$capabilities[] = $capability;
			}
		}//end foreach

		return $capabilities;
	}
869804
public function getStatusAllowableValues()
    {
        return [
            self::STATUS_ACTIVE,
            self::STATUS_PAUSED,
            self::STATUS_READY,
            self::STATUS_DELIVERED,
            self::STATUS_CANCELLED,
            self::STATUS_REVERTED,
        ];
    }
468175
def get_capabilities(self):
        
        params = {'service'      : 'WFS',
                  'request'      : 'GetCapabilities',
                  'version'      : '1.0.0'}

        caps_response = requests.get(self._wfs_server, params=params)
        caps_response.raise_for_status()

        return ET.fromstring(caps_response.content)
577225
public function getDesiredCapabilities()
	{
		$capabilities = parent::getDesiredCapabilities();

		if ( !isset($capabilities['platform']) ) {
			$capabilities['platform'] = 'Windows 7';
		}

		if ( !isset($capabilities['version']) ) {
			$capabilities['version'] = '';
		}

		return $capabilities;
	}
341232
public Capabilities toCapabilities() {
    DesiredCapabilities capabilities = DesiredCapabilities.opera();

    for (CapabilityInstance option : options.values()) {
      if (option.getValue() == null) {
        continue;
      }

      capabilities.setCapability(option.getCapability(), option.getValue());
    }

    return capabilities.merge(surplusCapabilities);
  }
924367
public function getAvailableTools()
    {
        if (count($this->available) === 0) {
            // include all tools
            $before = get_declared_classes();
            $files = glob(__DIR__ . '/Tools/Analyzer/*.php');
            foreach ($files as $file) {
                include_once $file;
            }
            $after = get_declared_classes();
            $this->available = [];
            foreach (array_diff($after, $before) as $class) {
                if (!in_array(ToolDefinition::class, class_implements($class), true)) {
                    continue;
                }

                $this->available[] = [
                    'name'      => call_user_func([$class, 'getToolName']),
                    'cli'       => call_user_func([$class, 'getCliName']),
                    'classname' => $class,
                    'composer'  => call_user_func([$class, 'getComposer']),
                    'internalClass'  => call_user_func([$class, 'getInternalClass'])
                ];
            }
        }

        return $this->available;
    }